pcp
[Top] [All Lists]

Re: [pcp] New pmlognow utility

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, pcp@xxxxxxxxxxx
Subject: Re: [pcp] New pmlognow utility
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Wed, 19 Aug 2015 10:54:46 -0400
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55D26ACB.50704@xxxxxxxxxxxxxxxx>
References: <55CCF097.7070902@xxxxxxxxxxx> <y0megj5bozh.fsf@xxxxxxxx> <55D1E306.2040208@xxxxxxxxxxx> <20150817141948.GA30081@xxxxxxxxxx> <55D26ACB.50704@xxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
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>