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 err -b shows only what went wrong since the last boot

Linux
~/tips/journalctl-priority-boot

journalctl -p err -b

Shows only the errors in the system log since the last boot.

The system journal is long and mostly fine. One command cuts it down to the lines that matter.

On a systemd Linux machine, run:

journalctl -p err -b

-b limits the output to the current boot. -p err filters by priority: according to the man page, a single level shows that level and everything more important, so you get err, crit, alert and emerg and skip warnings, notices and info.

Use -b -1 for the boot before the last one, which helps when the machine crashed and restarted. Add -u docker to look at one unit only, and --since today to shorten it further.

The caveat: a service that logs everything at info level, even its failures, will not show up here. If this comes back empty and the machine still misbehaves, drop the -p filter and read the unit’s own log.

Animation: typing journalctl -p err -b in a terminal
Current boot first, then the boot before

Further reading: man7.org: journalctl(1)

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link