Disk usage and vacuum by size/time journalctl
Show on-disk size, then prune to 500M and drop entries older than 2 days
journalctl --disk-usage; journalctl --vacuum-size=500M --vacuum-time=2d
more journalctl
all 12 commands →
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
Filter by priority error and above
journalctl -p err -b --no-pager