Use systemd logs to find the root cause of system anomalies — reboots, crashes, overheating, OOM, Kernel Panic.
journalctl -n 50 # last 50 lines
journalctl -f # follow in real time
journalctl --since "1 hour ago" # the last hour
journalctl -u ssh.service # only one service
last reboot # reboot history
journalctl --list-boots # list of Boot IDs
journalctl -b 0 # current boot
journalctl -b -1 # previous boot
journalctl -b -2 # two boots ago
journalctl -b -2 -e # end of previous boot (check shutdown)
A clean shutdown ends with:
System is going down for poweroff
Reached target Power-Off
journalctl -b -1 | grep -i "temperature\|thermal" # overheating check
journalctl -b -1 | grep -i "oom\|out of memory" # OOM check
journalctl -b -1 | grep -i "panic" # Kernel Panic check
sudo journalctl --vacuum-time=30d # keep 30 days
sudo journalctl --vacuum-size=500M # cap size at 500MB
7/18 power outage: my desktop I610M4 was offline for about a day, from 7/18 to the afternoon of 7/19.
last reboot confirmed the last boot was 7/19 22:56 → journalctl -b -2 -e showed no clean shutdown message for the previous boot → no overheating/OOM/Panic entries → Conclusion: an external power outage.
This note is also kept in my Obsidian knowledge base. Related topics: dmesg, systemd, OOM Killer, Kernel Panic.