pcp
[Top] [All Lists]

Re: [pcp] [PATCH] PCP pidstat PMDA

To: Martins Innus <minnus@xxxxxxxxxxx>, Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] [PATCH] PCP pidstat PMDA
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Tue, 21 Apr 2015 22:17:27 +0300
Cc: pcp developers <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5536827C.20607@xxxxxxxxxxx>
Organization: Red Hat
References: <5534C680.2020709@xxxxxxxxxx> <493537984.3276058.1429528962326.JavaMail.zimbra@xxxxxxxxxx> <5534EBA8.4030509@xxxxxxxxxx> <5536827C.20607@xxxxxxxxxxx>
Reply-to: myllynen@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
Hi Martins,

On 2015-04-21 20:01, Martins Innus wrote:
> On 4/20/15 8:06 AM, Marko Myllynen wrote:
>>
>>> Those new hotproc.* metrics do allow both a configuration file-based
>>> mechanism (like this new PMDA) & also support a very dynamic pmstore
>>> update model too, like:
>>>
>>> # pmstore hotproc.control.config 'fname = "java"'
>>>
>>> to set the process filtering on-the-fly (the above syntax may not be
>>> 100% correct, thats just from memory - it'll be close though).
>> Ok, I wasn't aware of this, would be great to know how to do that, the
>> above example doesn't seem to work and the pmdahotproc.1 man isn't
>> really that helpful.
>>
> I had an off by one error for the fname parameter in the pmda which
> should be fixed by:
> 
> -               vars.fname[len] = '\0';
> +               vars.fname[len-1] = '\0';
> 
> So you could do something similar to this:
> 
> [vagrant@centos65 linux_proc]$ sudo pmstore hotproc.control.config
> 'fname == "mingetty"'

thanks for checking, with the fix in place this works perfectly!

> As with proc in general, the amount of information returned will depend
> on your privilege. All metrics that are available for proc should be
> there for hotproc.  I will work on beefing up the docs. In general, I
> just took what I could find from the old implementation, but it does
> need some additions.

Sure, thanks again.

Cheers,

-- 
Marko Myllynen

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