pcp
[Top] [All Lists]

Re: [pcp] New pmlognow utility

To: pcp@xxxxxxxxxxx,Martins Innus <minnus@xxxxxxxxxxx>
Subject: Re: [pcp] New pmlognow utility
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Aug 2015 04:18:50 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55D498B6.7070804@xxxxxxxxxxx>
References: <55CCF097.7070902@xxxxxxxxxxx> <y0megj5bozh.fsf@xxxxxxxx> <55D1E306.2040208@xxxxxxxxxxx> <20150817141948.GA30081@xxxxxxxxxx> <55D26ACB.50704@xxxxxxxxxxxxxxxx> <55D498B6.7070804@xxxxxxxxxxx>
Martins ... %shell only added  very recently so make sure you've got a new 
enough version  of pmcpp ... you can cherrypick just pmcpp if your pmlpgger is 
new enough to unconditionally use pmcpp, else you'll need a recent pmlogger and 
pmcpp.

-----Original Message-----
From: Martins Innus <minnus@xxxxxxxxxxx>
To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx
Sent: Thu, 20 Aug 2015 12:54 am
Subject: Re: [pcp] New pmlognow utility

Ken,

On 8/17/15 7:14 PM, Ken McDonell wrote:
> On 18/08/15 00:19, Frank Ch. Eigler wrote:
>> ...
>> So you're starting from a preexisting pmlogger configuration file, but
>> one that doesn't say "log once ..." on all of its metrics?  ...
>
> Another option that may be feasible would be to use the macro 
> processing that is now included for all pmlogger configuration files 
> so you could do something like ...
>
>
> config
>
> %shell '[ -n "$PMLOGGER_ONCE" ] && echo %define PMLOGGER_ONCE; exit 0'
>
> %ifdef PMLOGGER_ONCE
> %define disk_dev_freq once
> %define cpu_all_freq once
> # etc ..
> %else
> %define disk_dev_freq '10 sec'
> %define cpu_all_freq '1 sec'
> # etc ..
> %endif
>
> log mandatory on %{disk_dev_freq} {
>     disk.dev
> }
>
> log mandatory on %{cpu_all_freq} {
>     kernel.all.cpu
> }
>
> The for the normal case
>     pmlogger -c config ...
>
> And for the logged once case
>     PMLOGGER_ONCE=yes pmlogger -c config ...

I missed that this was possible, but that seems to work really well!  
I'll switch over to using this for a week or so, and see if I notice any 
issues.

Thanks

Martins

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