Description
Investigation into Replacing pidstat
Tool Implementation
The pidstat
Pbench Agent tool is a wrapper around the sysstat
v12.0.3-1 version of the pidstat
command. The specific version is because the Pbench Agent wrapper, pidstat-convert
(agent/tool-scripts/datalog/
), understands a very specific output format, and v12.0.3-1 was the last version of sysstat
against which it is verified to work.
The ultimate invocation of the pidstat
command looks like the following:
pidstat -l -H -w -u -h -d -r -p ALL
- The
-t
switch can be added via tool registration using:pbench-register-tool --name=pidstat -- --threads
- The user can also specify a command pattern regurlar expression using:
pbench-register-tool --name=pidstat -- --patterns="(apache|httpd|*nginx*)"
- This results in
-C (apache|httpd|*nginx*)
being added to thepidstat
command line
- The user can also add specific
pidstat
options by using:pbench-register-tool --name=pidstat -- --options='-s -v'
- But that is not recommended since an arbitrary option could change how the output is formatted and cause the post-processing step to fail
- The
What About Using the pcp pidstat
Command?
Not an option at this time because not all the options used currently are supported by pcp pidstat
. Here are the unsupported options:
-H
-- Does not support this option, but does support emitting time stamps in seconds since the Epoch using-f '%s'
-w
-- Does not support reporting task switching data-u
-- Does not support reporting CPU utilization-h
-- Does not support one-line reporting request (no averages)-d
-- Does not support I/O statistics reporting-p ALL
-- Does not appear to work, as no statistics are reported
Without these options we cannot use pcp-pidstat
as a direct replacement.
However, we probably wouldn't want to since we really don't want to replace the command as is, but move to a PCP archive collection directly, and then have the data generated from the archive for compatibility.