Skip to content

How to debug powered off linux machine

Inspect boot time:

Bash
who -b
Bash
last -x | head | tac

Check system messages:

For CentOS/RHEL systems, you’ll find the logs at /var/log/messages while for Ubuntu/Debian systems, its logged at /var/log/syslog

Bash
sudo grep -iv ': starting\|kernel: .*: Power Button\|watching system buttons\|Stopped Cleaning Up\|Started Crash recovery kernel' \
  /var/log/messages /var/log/syslog /var/log/apcupsd* \
  | grep -iw 'recover[a-z]*\|power[a-z]*\|shut[a-z ]*down\|rsyslogd\|ups'
Bash
sudo ausearch -i -m system_boot,system_shutdown | tail -4
Bash
sudo journalctl --list-boots
Back to top