brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: journalctl -p warning..err selects a priority range

Journalctl
~/tips/tip-journalctl-priority-range-warning-err

journalctl -b -p warning..err

Selects log lines between two severity levels, such as warnings up to errors.

Plain -p err hides warnings, and I often want the middle of the scale.

journalctl -b -p warning..err
journalctl -b -p crit -u docker

-p accepts a single level, or a range FROM..TO. Names are emerg, alert, crit, err, warning, notice, info and debug, matching numbers 0 to 7. A single level includes everything more severe, so the second line shows crit, alert and emerg. A range includes both its start and its end value. Services that log everything as info will not show up in a priority filter.

Further reading: journalctl manual page

More Journalctl tips journalctl -k -g 'killed process' --since "2 days ago" journalctl _PID=1 -b ls -lh /var/log/journal/*/*.journal~ Storage=volatile sudo journalctl --setup-keys All Journalctl tips (81) All topics

Link