From d34281cddfcea1f756625ed4c72fd80ab893f3d7 Mon Sep 17 00:00:00 2001 From: Bryan Quigley Date: Mon, 6 Jun 2016 15:37:45 -0400 Subject: [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 Signed-off-by: Bryn M. Reeves --- sos/plugins/systemd.py | 17 +++++++++++------ 1 file 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" ]) -- cgit