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 --disk-usage tells you how much space the journal takes

Journalctl
~/tips/tip-journalctl-disk-usage-check

journalctl --disk-usage

Reports the total disk space used by the system journal files.

When the root partition fills up, I look at the journal before I look at anything else.

journalctl --disk-usage
sudo du -sh /var/log/journal

The first command reports the combined size of archived and active journal files, for example 1.2G. The second shows the same from the file system side, but only for a persistent journal. If the number is too large, shrink it with --vacuum-size or set a permanent cap with SystemMaxUse= in journald.conf. With a volatile journal the files live in /run/log/journal and use memory.

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