Ken,
It's been a while since I've thought about the unit semantics in PCP...
>From memory and looking at the code, the -i flag was there for generating
fixed width output but not using scientific format, rather by changing the
units to be consistent (ie SPACE to bytes) and then using "K", "M", "G"
postfix multiplier for large values. That way it could keep the values to
a manageable size.
So I'm not sure the "if" statement is what's wrong?
Looking down further the code treats time dimension metrics differently,
it has to be a counter...I'm going to have a play to understand the output
here.
Chatz
-----Original Message-----
From: pcp-bounces@xxxxxxxxxxx [mailto:pcp-bounces@xxxxxxxxxxx] On Behalf
Of Ken McDonell
Sent: Saturday, 28 June 2014 1:51 PM
To: pcp@xxxxxxxxxxx
Subject: [pcp] pmdumptext question
Chatz, are you still there?
I was trying to use pmdumptext to validate the derived metric expressions
for kernel CPU times expressed as a percentage, and could make no sense of
the numbers.
Looking at the code I notice this in checkUnits() ...
// Only scale units if interactive and not raw
if (rawFlag || !niceFlag)
return;
Now this just looks wrong ... I can see no reason for -i enabling scaling
(especially for time utilization) ...
Can anyone explain the rationale for the current code, before I go change
it?
The example below shows that pmdumptext -I produces numbers in the same
range as pmval, but pmdumptext without -I produces numbers that depend on
the units of kernel.all.cpu.user from the kernel PMDA.
kenj@bozo-vm:~/tmp$ pmval kernel.all.cpu.user
metric: kernel.all.cpu.user
host: bozo-vm
semantics: cumulative counter (converting to rate)
units: millisec (converting to time utilization)
samples: all
0.0
1.995E-02
1.995E-02
9.984E-03
9.986E-03
^C
kenj@bozo-vm:~/tmp$ pmdumptext kernel.all.cpu.user
Sat Jun 28 13:44:55 ?
Sat Jun 28 13:44:56 9.995
Sat Jun 28 13:44:57 0.000
Sat Jun 28 13:44:58 10.014
Sat Jun 28 13:44:59 9.991
Sat Jun 28 13:45:00 10.000
Sat Jun 28 13:45:01 10.011
^C
kenj@bozo-vm:~/tmp$ pmdumptext -i kernel.all.cpu.user
Sat Jun 28 13:45:13 ?
Sat Jun 28 13:45:14 0.01
Sat Jun 28 13:45:15 0.02
Sat Jun 28 13:45:16 0.01
Sat Jun 28 13:45:17 0.01
_______________________________________________
pcp mailing list
pcp@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/pcp
|