On 5/8/2015 2:35 PM, Martins Innus wrote:
Ken,
On 5/7/15 10:27 PM, Ken McDonell wrote:
But unfortunately in this case the PMDA implementor says the metrics
are seconds, but they are not (see the example below) ... this is a
BUG .. the PMDA should return hotproc.psinfo.start_time either /100
and call it seconds or *10 and call it msec (and increase it to
64-bits in this case).
# pminfo -f proc.psinfo.start_time | sed -e 's/.* value //' | sort
-nr | head -2 ; pminfo -f kernel.all.uptime
9086825
9086825
kernel.all.uptime
value 90868
So I started looking into this. Looks like this has been there
forever (hotproc just uses the same semantics defined in proc). But I
have added other proc metrics that may need fixing as well.
While the change for this metric (to ms and 64 bit to match the
rest of the "time" metrics in proc) seems correct and straightforward,
I have some confusion on the types in general for some of the proc
time metrics.
....Lots of text cut....
So I had a first crack at changing some of this. Maybe in practice it
doesn't really matter? In any event, needs a look over by someone who
understands the history of the KERNEL_ULONG type. Not sure if it needs
to be used in more, or in fewer cases in this pmda.
https://github.com/ubccr/pcp/tree/martins_working
The few metrics that were defined as KERNEL_ULONG, I tried to get rid of
the explicit uint32 casts.
Also confirmed that the time metrics were 64bit msec in the cases where
I though they should be. This changes the type of the following metrics:
proc.psinfo.start_time
proc.psinfo.delayacct_blkio_time
proc.psinfo.guest_time
proc.psinfo.cguest_time
Passes some initial QA runs on 64bit. Will continue testing if this
looks reasonable.
At least the proc.psinfo.start_time type is currently incorrect, and
something should be done there if the rest is not necessary.
Thanks
Martins
commit 08c4660380dd94e9a6f81065d8f9e85dd5e4c1ff
Author: Martins Innus <minnus@xxxxxxxxxxx>
Date: Thu May 14 19:39:32 2015 +0000
Fixup some of the time types in linux_proc
Some metrics were reporting as seconds when they were not. Fix
them to be msec as appropriate.
Some metrics with type KERNEL_ULONG had some explcit uint32
conversions. Try to generalize.
src/pmdas/linux/convert.h | 2 +
src/pmdas/linux_proc/help_text.h | 2 +-
src/pmdas/linux_proc/pmda.c | 57
++++++++++++++++---------------------
3 files changed, 28 insertions(+), 33 deletions(-)
|