aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2018-07-12 13:11:44 -0400
committerBryn M. Reeves <bmr@redhat.com>2018-08-16 16:31:10 +0100
commit46fffd469f4f3d07337dc335cfc24341e836f23b (patch)
tree6b80bd9cba82a3f93f54acaf151707e27db6b726
parent63ad6c251ab88ab2f0e07ae9e3f1b2771d5e90ca (diff)
downloadsos-46fffd469f4f3d07337dc335cfc24341e836f23b.tar.gz
[origin] Collect statistics information
Adds collection of 'oc adm top' output for images and imagestreams. Resolves: #1165 Closes: #1383 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/plugins/origin.py26
1 files 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'):