just found this hidden in my spam folder, sorry about that.

to tell the truth, you're the first one I've ever heard from who even looks
at buddyinfo.  It was easy to implement so I tossed it in figuring someone
might find it useful.  ;)

sounds like I could also just say:

for (my $i=0; $i<scalar(@fields)-4; $i++)

I'll get it into the next release.  thanks...

-mark

On Fri, Apr 10, 2015 at 2:00 PM, Greg Oldendick <[email protected]> wrote:

> On my system, there are only 9 values in /proc/buddyinfo, rather than the
> 11 which are normally present:
>
> # cat /proc/buddyinfo
> Node 0, zone      DMA    206    152    111    349     95     42     48
>  20      2
>
>
>
> This causes perl to complain about uninitialized values. I created a crude
> patch which seems to work for me. There may be other areas which need to be
> patched which I haven't yet identified.
>
>
> --- /tmp/formatit.ph    2015-04-10 13:40:47.266761222 -0400
> +++ /usr/share/collectl/formatit.ph     2015-04-10 13:43:55.896755048
> -0400
> @@ -2485,11 +2485,12 @@
> elsif ($subsys=~/b/i && $type=~/^buddy/)
> {
> my @fields=split(/\s+/, $data);
> +    my $fieldsize=scalar(@fields)-4;
> $buddyNode[$budIndex]=$fields[1];
> $buddyZone[$budIndex]=$fields[3];
> $buddyNode[$budIndex]=~s/,$//;
>
> -    for (my $i=0; $i<11; $i++)
> +    for (my $i=0; $i<$fieldsize; $i++)
> {
> $buddyInfo[$budIndex][$i]=$fields[$i+4];
> $buddyInfoTot[$i]+=$fields[$i+4];
>
>
> Just thought i would pass this info along.
>
> Thanks,
> Greg
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Collectl-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/collectl-interest
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest

Reply via email to