]> granicus.if.org Git - sysstat/commit
Update sadf to use metadata matching the same metrics from PCP
authorNathan Scott <nathans@redhat.com>
Tue, 23 Mar 2021 06:59:18 +0000 (17:59 +1100)
committerNathan Scott <nathans@redhat.com>
Thu, 25 Mar 2021 04:01:14 +0000 (15:01 +1100)
commita44b55221e450203499d05b0ff19807175dcfab3
tree8fad0791b2d2a015d4f573097972256d5a3727db
parent3e400d593af86ee2cb53d7780c771b3603acbfc7
Update sadf to use metadata matching the same metrics from PCP

When operating with the -l option in sadf we want to generate PCP
archives that match the PCP archives generated by pmlogger(1) as
closely as possible.  The advantage to doing this is that the live
and historical modes to the PCP tools become interchangeable; i.e.
pmchart views, pmie rules, grafana-pcp dashboards, and so on, all
expect metrics named according to the PCP conventions.

The reason sadf is not already doing this (AIUI), is that it was
originally based on the sar2pcp(1) utility.  This tool (which we
plan to deprecate in PCP in favour of the sysstat functionality)
used the rate-converted counter values as its starting point and
not the raw counters we have access to within sysstat itself.

I've audited all of the metrics being added to PCP archives with
the sadf -l option now, and all now align with current metadata
in PCP.  I've also added a few uname(2) metrics from the record
header (in the way hinv.ncpu was already being used).
pcp_def_metrics.c
pcp_def_metrics.h
pcp_stats.c
pcp_stats.h
sa.h
sadf.c
sadf_misc.c