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: dmesg --level=err,warn filters the linux kernel log by severity

Linux
~/tips/tip-linux-dmesg-level-filter

sudo dmesg --level=err,warn

Shows only kernel errors and warnings instead of the whole ring buffer.

The kernel log is noisy, and I usually only want errors and warnings.

sudo dmesg --level=err,warn
sudo dmesg --level=err --since "1 hour ago"

--level takes a comma-separated list of levels such as emerg, err, warn and info. Together with --since, available in recent util-linux versions, you can look at the last hour of kernel errors. On many systems dmesg needs root because of kernel.dmesg_restrict. The kernel ring buffer is small and old lines are overwritten, so use journalctl -k for older boots.

Further reading: dmesg manual page

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