From 46fffd469f4f3d07337dc335cfc24341e836f23b Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Thu, 12 Jul 2018 13:11:44 -0400 Subject: [origin] Collect statistics information Adds collection of 'oc adm top' output for images and imagestreams. Resolves: #1165 Closes: #1383 Signed-off-by: Jake Hunsaker --- sos/plugins/origin.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/sos/plugins/origin.py b/sos/plugins/origin.py index 02bc047a..0e384117 100644 --- a/sos/plugins/origin.py +++ b/sos/plugins/origin.py @@ -124,14 +124,28 @@ class OpenShiftOrigin(Plugin): # # Note: Information about nodes, events, pods, and services # is already collected by the Kubernetes plugin + + subcmds = [ + "describe projects", + "adm top images", + "adm top imagestreams" + ] + self.add_cmd_output([ - "%s describe projects" % oc_cmd_admin, - "%s get -o json hostsubnet" % oc_cmd_admin, - "%s get -o json clusternetwork" % oc_cmd_admin, - "%s get -o json netnamespaces" % oc_cmd_admin, - # Registry and router configs are typically here - "%s get -o json dc -n default" % oc_cmd_admin, + '%s %s' % (oc_cmd_admin, subcmd) for subcmd in subcmds ]) + + jcmds = [ + "hostsubnet", + "clusternetwork", + "netnamespaces", + "dc -n default" + ] + + self.add_cmd_output([ + '%s get -o json %s' % (oc_cmd_admin, jcmd) for jcmd in jcmds + ]) + if self.get_option('diag'): diag_cmd = "%s adm diagnostics -l 0" % oc_cmd_admin if self.get_option('diag-prevent'): -- cgit