aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Quigley <bryan.quigley@canonical.com>2016-06-06 15:37:45 -0400
committerBryn M. Reeves <bmr@redhat.com>2016-10-25 15:11:40 +0100
commitd34281cddfcea1f756625ed4c72fd80ab893f3d7 (patch)
tree51d6ddd0adbda6724f5c105211e40eb9e24e87b6
parent42e3eacae5103efd032129ebfd3ff9fbdf1d722c (diff)
downloadsos-d34281cddfcea1f756625ed4c72fd80ab893f3d7.tar.gz
[systemd] Collect detailed runtime info on each unit
This collects status from all units, which replaces the need to run "systemctl list-units --all" seperately and provides much richer information for every unit - including a bit of log output, process tree, memory usage, and more. It also runs show for all services which should capture the majority of Limits and other information we generally look for. systemd-analyze - provides boot performance info systemctl status - shows system status and nice process tree We also now ls /lib/systemd recursively as some folder names below it have changed. Lastly, we make sure it runs on Ubuntu/Debian as we store systemd in /lib not /usr/lib. Closes: #831. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/systemd.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/sos/plugins/systemd.py b/sos/plugins/systemd.py
index 68d5079a..0d7c9596 100644
--- a/sos/plugins/systemd.py
+++ b/sos/plugins/systemd.py
@@ -25,22 +25,27 @@ class Systemd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
profiles = ('system', 'services', 'boot')
packages = ('systemd',)
- files = ('/usr/lib/systemd/systemd',)
+ files = (
+ '/usr/lib/systemd/systemd',
+ '/lib/systemd/systemd'
+ )
def setup(self):
self.add_cmd_output([
+ "systemctl status --all",
"systemctl show --all",
+ "systemctl show *service --all",
+ # It is possible to do systemctl show with target, slice,
+ # device, socket, scope, and mount too but service and
+ # status --all mostly seems to cover the others.
"systemctl list-units",
"systemctl list-units --failed",
- "systemctl list-units --all",
"systemctl list-unit-files",
"systemctl show-environment",
"systemd-delta",
+ "systemd-analyze",
"journalctl --list-boots",
- "ls -l /lib/systemd",
- "ls -l /lib/systemd/system-shutdown",
- "ls -l /lib/systemd/system-generators",
- "ls -l /lib/systemd/user-generators",
+ "ls -lR /lib/systemd",
"timedatectl"
])