henrik -- problems with do_vmstat.c and aix p5/p6 lpar values for cpu_pc and cpu_ec

Kauffman, Tom KauffmanT at nibco.com
Thu Nov 1 14:48:57 CET 2007

I've been playing with this off and on for a while in our test

(Yes, I've read the wiki article).

I remember you said we should not need to strip the period out of the
value returned from vmstat, because the rrd is storing values in
floating point notation.

But -- in do_vmstat.c, you're populating the rrd update vector with this
statement : p += sprintf(p, ":%d", values[layout[defidx].index]);

Now I'm NOT a C programmer - but won't that ":%d" format explicitly
truncate the value to an integer?

The values I'm talking about are the rightmost two here:

nile:-:/home/kauffmant > vmstat 10 1

System configuration: lcpu=2 mem=8192MB ent=0.10

kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
pc    ec
 0  0 1080720 394462   0   0   0   0    0   0  28  260 147  2  7 91  0
0.01  10.2

Cpu_pc is 0.01 and cpu_ec is 10.2 -- which means I'm using 10.2 percent
of my 0.1 cpu entitlement, for a real cpu count of 0.01.

So, should I plug in the code to strip the decimal point and modify the
grapher definitions to divide by 100 and 10, or is there a simpler way


Tom Kauffman
CONFIDENTIALITY NOTICE:  This email and any attachments are for the 
exclusive and confidential use of the intended recipient.  If you are not
the intended recipient, please do not read, distribute or take action in 
reliance upon this message. If you have received this in error, please 
notify us immediately by return email and promptly delete this message 
and its attachments from your computer system. We do not waive  
attorney-client or work product privilege by the transmission of this

More information about the Xymon mailing list