Show logs from the previous boot
why did the server reboot | logs before the crash | journalctl last boot | what happened before the reboot | journalctl | systemd | crash | bootjournalctl -b -1 -n 200 --no-pager-b -1 selects the previous boot and -n 200 shows its last 200 lines, which are the minutes before the restart or crash. There you can see, for example, the OOM killer, kernel errors or a regular shutdown. journalctl --list-boots lists all stored boots with their time range.
Note: Only works with a persistent journal. If the directory /var/log/journal is missing, journald keeps logs in RAM only and the logs of earlier boots are lost.
Also searched as
- why did the server reboot
- logs before the crash
- journalctl last boot
- what happened before the reboot