Combine field filters with OR
A bare + is a logical OR between match groups; same-field matches within a group are OR'd too
journalctl _PID=1 + _COMM=sshd -o short-iso
- tool
- journalctl12 commands
More journalctl commands
-
journalctl --grep='oom|out of memory' --case-sensitive=false -bPCRE2 match on MESSAGE; pair with -p err to narrow noise. note: scans, not indexed
-
journalctl -u <name> -o verbose -n 1Dumps every journal field incl. cursor for an entry; -o json-pretty for machine parsing
-
journalctl --list-boots && journalctl -b -1 -p warningIndex past boots, then -b -1 reads the prior boot. note: needs persistent storage
-
journalctl -k -b -o short-precise --grep='segfault|I/O error'Like dmesg but with real wall-clock and boot filtering; -k means _TRANSPORT=kernel
-
journalctl --disk-usage; journalctl --vacuum-size=500M --vacuum-time=2dShow on-disk size, then prune to 500M and drop entries older than 2 days