aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2019-12-17 13:33:58 -0500
committerPavel Moravec <pmoravec@redhat.com>2020-01-28 17:45:23 +0100
commitf41e8f22143391a4e38282e60fc8390713c3be10 (patch)
tree235b277f65a8741432b8dabc93a50464952a9b86
parentaf43e1e19ef41fd77160c4618d9f8da54fe659e4 (diff)
downloadsos-f41e8f22143391a4e38282e60fc8390713c3be10.tar.gz
[memory] Collect slabtop info
Adds collection of `slabtop -o` to show the top consumers of SLAB. Note that currently there is an issue with this command that will cause it to hang if stdin does not receive a tty - which is exactly what happens when commands are run via `timeout` without the `foreground` option. As such, this command for now will use `foreground=True` parameter for `add_cmd_output()`. Once/if this slaptop bug is fixed, this plugin will be updated to no longer use that parameter. Resolves: #1895 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/memory.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py
index 48ba150b..370b7589 100644
--- a/sos/plugins/memory.py
+++ b/sos/plugins/memory.py
@@ -36,4 +36,7 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"lsmem -a -o RANGE,SIZE,STATE,REMOVABLE,ZONES,NODE,BLOCK"
])
+ # slabtop -o will hang if not handed a tty via stdin
+ self.add_cmd_output("slabtop -o", foreground=True)
+
# vim: set et ts=4 sw=4 :