pcp
[Top] [All Lists]

pmdumptext question

To: <pcp@xxxxxxxxxxx>
Subject: pmdumptext question
From: "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 28 Jun 2014 13:50:12 +1000
Delivered-to: pcp@xxxxxxxxxxx
Thread-index: Ac+SgxG4dqBy6BQlQjWKmRdwUm25nw==
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

<Prev in Thread] Current Thread [Next in Thread>