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 ...
|