pcp
[Top] [All Lists]

Re: [pcp] New pmlognow utility

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] New pmlognow utility
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Aug 2015 09:14:19 +1000
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20150817141948.GA30081@xxxxxxxxxx>
References: <55CCF097.7070902@xxxxxxxxxxx> <y0megj5bozh.fsf@xxxxxxxx> <55D1E306.2040208@xxxxxxxxxxx> <20150817141948.GA30081@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0
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 ...

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