pcp
[Top] [All Lists]

RE: proc.psinfo.wchan_s broken?

To: "Siekas, Greg" <greg.siekas@xxxxxxxxxx>
Subject: RE: proc.psinfo.wchan_s broken?
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Fri, 05 Sep 2008 09:47:45 +1000
Cc: pcp@xxxxxxxxxxx
In-reply-to: <258BABDDC780384FBF0FF15CCFDFABE10673EDA3@XCH-NW-7V2.nw.nos.boeing.com>
References: <258BABDDC780384FBF0FF15CCFDFABE10673E89D@XCH-NW-7V2.nw.nos.boeing.com> <1220511873.4544.33.camel@verge.scott.net.au> <258BABDDC780384FBF0FF15CCFDFABE10673EDA3@XCH-NW-7V2.nw.nos.boeing.com>
Sender: pcp-bounce@xxxxxxxxxxx
Hi there Greg,

On Thu, 2008-09-04 at 07:09 -0700, Siekas, Greg wrote:
> Nathan,
> 
> I applied this patch to the latest git tree.  The value looks to be
> correct.  Not exactly the same output as ps -leaf, but close.
> 
> ps -leaf output:
>  0 S user   8519  7590  0  76   0 -  2545 wait   Aug21 pts/58   00:00:00
> /bin/bash
> 
> pminfo -F proc.psinfo.wchan_s output:
>  inst [8519 or "008519 /bin/bash"] value "do_wait"

The PCP data is right - "ps" is truncating symbols, there is no "wait"
symbol in the kernel - you can "egrep ' (do_|)wait' /proc/kallsyms" to
verify.  I assume it does this to reduce the size of symbols to make
columns line up, etc?  Not sure why it does it, but you can actually
run strace on ps and see the full symbol name in the /proc/<pid>/wchan
read buffer.

> Is proc.psinfo.wchan also broken for newer kernels?

It is correct, it was just the symbol decoding (wchan_s) that wasn't
working anymore.

> Is there a list somewhere that indicates which metrics do and don't work
> for various operating systems and kernels?

If a metric is known not to work, it should report an error (I usually
use PM_ERR_APPVERSION).  "pminfo -v" will report all metrics which are
returning an error.  Obviously, in this case, where it was incorrect
but we didn't know about it (til now), that wont pick up such problems.

cheers.

--
Nathan


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