Kernel ring buffer with timestamps journalctl
Like dmesg but with real wall-clock and boot filtering; -k means _TRANSPORT=kernel
journalctl -k -b -o short-precise --grep='segfault|I/O error'
more journalctl
all 12 commands →
Disk usage and vacuum by size/time
journalctl --disk-usage; journalctl --vacuum-size=500M --vacuum-time=2d
Follow logs by syslog identifier
journalctl -t kernel -t sudo -f --no-hostname
Project selected fields as columns
journalctl -u <name> --output=json --output-fields=__REALTIME_TIMESTAMP,MESSAGE,_PID | jq -r '[.__REALTIME_TIMESTAMP,._PID,.MESSAGE]|@tsv'
Merge journals from a directory
journalctl -D /mnt/crashed/var/log/journal -b -1 -p err
Verify persistent storage is enabled
journalctl --header | grep -iE 'file|state'; ls -d /var/log/journal 2>/dev/null || echo volatile