Diagnostics: Difference between revisions
From Pengwings
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
===List all system power on/off and | ===List all system power on/off and uptime for each boot=== | ||
last -x | grep -E 'shutdown|reboot' | last -x | grep -E 'shutdown|reboot' | ||
===Show system logs=== | ===Show system logs=== | ||
| Line 8: | Line 8: | ||
Boot entry can be an offset, e.g. -1 will give you 1 boot earlier | Boot entry can be an offset, e.g. -1 will give you 1 boot earlier | ||
journalctl -b -1 | journalctl -b -1 | ||
Same command, but limited to only showing kernel logs | Same command, but limited to only showing kernel logs, add -k | ||
journalctl -k -b -1 | journalctl -k -b -1 | ||
Time filtering | |||
journalctl --since "2026-08-01 08:00:00" --until "2026-08-01 12:00:00" | |||
===Show logs of specific systemd service=== | ===Show logs of specific systemd service=== | ||
journalctl -u containerd.service | journalctl -u containerd.service | ||
Latest revision as of 13:22, 18 August 2026
List all system power on/off and uptime for each boot
last -x | grep -E 'shutdown|reboot'
Show system logs
From current boot
journalctl -b
From a specific boot
journalctl -b <entry>
Boot entry can be an offset, e.g. -1 will give you 1 boot earlier
journalctl -b -1
Same command, but limited to only showing kernel logs, add -k
journalctl -k -b -1
Time filtering
journalctl --since "2026-08-01 08:00:00" --until "2026-08-01 12:00:00"
Show logs of specific systemd service
journalctl -u containerd.service