aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2018-02-16 17:31:10 -0500
committerBryn M. Reeves <bmr@redhat.com>2018-05-15 15:03:21 +0100
commit8ded939bccd223c9a02c94634ccd12e352c70a41 (patch)
treed9b6bd6b614ac3381c89211373a00963d3e958e5
parent4db18a2f7a9a5a852f92f5050044a6243e8cc921 (diff)
downloadsos-8ded939bccd223c9a02c94634ccd12e352c70a41.tar.gz
[ntp] Collect ntpq -c output
Collects 'ntpq -c as' output and will also iterate over all association ids listed to collect 'ntpq -c rv $id'. Resolves: #1218 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ntp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py
index 929e3d13..f928a8ee 100644
--- a/sos/plugins/ntp.py
+++ b/sos/plugins/ntp.py
@@ -32,9 +32,15 @@ class Ntp(Plugin):
])
self.add_cmd_output([
"ntptime",
- "ntpq -p"
+ "ntpq -pn",
+ "ntpq -c as"
])
+ ids = self.get_command_output('ntpq -c as')
+ if ids['status'] == 0:
+ for asid in [i.split()[1] for i in ids['output'].splitlines()[3:]]:
+ self.add_cmd_output("ntpq -c 'rv %s'" % asid)
+
class RedHatNtp(Ntp, RedHatPlugin):