mambareport: update report generation with systemd support
This commit is contained in:
parent
bebcd1bdb8
commit
f75b7d3ce8
@ -2,10 +2,10 @@
|
|||||||
#
|
#
|
||||||
# openmamba system report generation tool
|
# openmamba system report generation tool
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2008-2019 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=20110807
|
VERSION=20190304
|
||||||
TEMPFILE=`tempfile`
|
TEMPFILE=`tempfile`
|
||||||
|
|
||||||
. ${ROOT}/etc/sysconfig/machine
|
. ${ROOT}/etc/sysconfig/machine
|
||||||
@ -123,7 +123,7 @@ _EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "openmamba report generation tool $VERSION"
|
echo "openmamba report generation tool $VERSION"
|
||||||
echo "Copyright (c) 2008-2013 by Silvan Calarco"
|
echo "Copyright (c) 2008-2019 by Silvan Calarco <info@openmamba.org>"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
[ $UID = 0 ] || {
|
[ $UID = 0 ] || {
|
||||||
@ -159,36 +159,37 @@ catcommand /usr/bin/lsusb "USB hardware information"
|
|||||||
catcommand /sbin/lsmod "Loadel kernel modules"
|
catcommand /sbin/lsmod "Loadel kernel modules"
|
||||||
catcommand "rpm -qa|grep kernel-mamba" "Installed kernel packages"
|
catcommand "rpm -qa|grep kernel-mamba" "Installed kernel packages"
|
||||||
catcommand "ls -l /etc/alternatives" "System alternatives"
|
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
|
# process/memory information
|
||||||
catcommand "top -b -n1" "Top running processes"
|
catcommand "top -b -n1" "Top running processes"
|
||||||
catcommand "ps aux" "All running processes"
|
catcommand "ps aux" "All running processes"
|
||||||
|
|
||||||
# kernel boot problems
|
# system boot troubleshooting
|
||||||
catfile /proc/cmdline "kernel startup command line"
|
catfile /proc/cmdline "kernel startup command line"
|
||||||
catcommand "ls -l /boot" "boot files"
|
catcommand "ls -l /boot" "boot files"
|
||||||
catfile /boot/grub/grub.cfg "GRUB configuration"
|
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"
|
catfile "/etc/modprobe.d/*" "modules configuration"
|
||||||
catcommand "lsinitrd /boot/initramfs-`uname -r`.img" "running kernel initial ramdisk"
|
catcommand "lsinitrd /boot/initramfs-`uname -r`.img" "running kernel initial ramdisk"
|
||||||
|
|
||||||
# system boot problems
|
# system services status
|
||||||
catfile /var/log/initd.sysinit.start "system init logfile"
|
catcommand "systemctl status" "systemctl status"
|
||||||
catfile "/var/log/initd.3.start" "runlevel 3 init logfile"
|
catcommand "systemctl" "systemctl services status"
|
||||||
catfile "/var/log/initd.5.start" "runlevel 5 init logfile"
|
catcommand "systemd-analyze blame" "systemd services startup timings"
|
||||||
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"
|
|
||||||
|
|
||||||
# Graphical subsystem
|
# Graphical subsystem
|
||||||
catfile /var/log/Xorg.0.log "Xorg startup log"
|
catfile /var/log/Xorg.0.log "Xorg startup log"
|
||||||
catfile /etc/X11/xorg.conf "Xorg configuration"
|
catfile /etc/X11/xorg.conf "Xorg configuration"
|
||||||
|
catfile /etc/X11/xorg.conf.d/* "Xorg configuration modules"
|
||||||
catcommand "DISPLAY=:0 /usr/bin/glxinfo" "GLX information"
|
catcommand "DISPLAY=:0 /usr/bin/glxinfo" "GLX information"
|
||||||
tailfile $HOME/.xsession-errors "desktop session log"
|
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
catfile "/proc/asound/card*/codec*" "Audio driver codecs"
|
catfile "/proc/asound/card*/codec*" "Audio driver codecs"
|
||||||
|
Loading…
Reference in New Issue
Block a user