From f75b7d3ce8d5b31707229c4bc5a02036850b1beb Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 4 Mar 2019 17:37:52 +0100 Subject: [PATCH] mambareport: update report generation with systemd support --- mambareport/openmamba-makereport | 35 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/mambareport/openmamba-makereport b/mambareport/openmamba-makereport index 4115843..f6b12c6 100755 --- a/mambareport/openmamba-makereport +++ b/mambareport/openmamba-makereport @@ -2,10 +2,10 @@ # # openmamba system report generation tool # -# Copyright (c) 2008-2013 by Silvan Calarco +# Copyright (c) 2008-2019 by Silvan Calarco # -VERSION=20110807 +VERSION=20190304 TEMPFILE=`tempfile` . ${ROOT}/etc/sysconfig/machine @@ -123,7 +123,7 @@ _EOF } echo "openmamba report generation tool $VERSION" -echo "Copyright (c) 2008-2013 by Silvan Calarco" +echo "Copyright (c) 2008-2019 by Silvan Calarco " echo [ $UID = 0 ] || { @@ -159,36 +159,37 @@ catcommand /usr/bin/lsusb "USB hardware information" catcommand /sbin/lsmod "Loadel kernel modules" catcommand "rpm -qa|grep kernel-mamba" "Installed kernel packages" catcommand "ls -l /etc/alternatives" "System alternatives" -tailfile /var/log/messages "system messages log" + +# kernel and system logs +catcommand "journalctl --system -b | head -n 1000" "system journal from boot" +catcommand "journalctl --system -n 500" "system journal last lines" +catcommand /bin/dmesg "last kernel messages" + +# user log +catcommand "sudo -u ${SUDO_USER} journalctl -b --user | head -n 500" "user journal from startup" +catcommand "sudo -u ${SUDO_USER} journalctl --user -n 500" "user journal last entries" # process/memory information catcommand "top -b -n1" "Top running processes" catcommand "ps aux" "All running processes" -# kernel boot problems +# system boot troubleshooting catfile /proc/cmdline "kernel startup command line" catcommand "ls -l /boot" "boot files" catfile /boot/grub/grub.cfg "GRUB configuration" -catfile /var/log/dmesg.log "kernel startup messages" -catcommand /bin/dmesg "last kernel messages" catfile "/etc/modprobe.d/*" "modules configuration" catcommand "lsinitrd /boot/initramfs-`uname -r`.img" "running kernel initial ramdisk" -# system boot problems -catfile /var/log/initd.sysinit.start "system init logfile" -catfile "/var/log/initd.3.start" "runlevel 3 init logfile" -catfile "/var/log/initd.5.start" "runlevel 5 init logfile" -catfile /var/log/postplug.log "system configuration tool" - -# Suspend/Powersave -catfile /var/log/pm-powersave.log "Current powersave logfile" -catfile /var/log/pm-suspend.log "Last suspend logfile" +# system services status +catcommand "systemctl status" "systemctl status" +catcommand "systemctl" "systemctl services status" +catcommand "systemd-analyze blame" "systemd services startup timings" # Graphical subsystem catfile /var/log/Xorg.0.log "Xorg startup log" catfile /etc/X11/xorg.conf "Xorg configuration" +catfile /etc/X11/xorg.conf.d/* "Xorg configuration modules" catcommand "DISPLAY=:0 /usr/bin/glxinfo" "GLX information" -tailfile $HOME/.xsession-errors "desktop session log" # Audio catfile "/proc/asound/card*/codec*" "Audio driver codecs"