diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-12-19 15:04:58 -0500 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-19 18:25:27 +0000 |
commit | b7e8f93947869990e6f00ad69d64a2f621d6abca (patch) | |
tree | 2f7efeaeb953a2ca03f0fdf83fa64000e3a9f53e | |
parent | 8aa32a4288d595cb760de3000e468b3392fa3891 (diff) | |
download | sos-b7e8f93947869990e6f00ad69d64a2f621d6abca.tar.gz |
[pcp] Collect summary data for the current day
Adds collection of a pmstat summary output using 5 minute intervals for
the current day, and makes a root symlink to it in the archive.
Resolves: #1520
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/pcp.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sos/plugins/pcp.py b/sos/plugins/pcp.py index ea86d8b9..da7158a6 100644 --- a/sos/plugins/pcp.py +++ b/sos/plugins/pcp.py @@ -150,6 +150,16 @@ class Pcp(Plugin, RedHatPlugin, DebianPlugin): # Need to get the current status of the PCP infrastructure self.add_cmd_output("pcp") - + # Collect a summary for the current day + res = self.get_command_output('pcp') + if res['status'] == 0: + for line in res['output'].splitlines(): + if line.startswith(' pmlogger:'): + arc = line.split()[-1] + self.add_cmd_output( + "pmstat -S 00:00 -T 23:59 -t 5m -x -a %s" % arc, + root_symlink="pmstat" + ) + break # vim: set et ts=4 sw=4 : |