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 --namespace reads a separate journal namespace

Journalctl
~/tips/tip-journalctl-namespace-separate-journal

journalctl --namespace=myapp

Shows the logs of one journal namespace, or all namespaces at once with a star.

A noisy application can have its own journal, with its own size limits, so it cannot push other logs out.

Journal namespaces keep log data apart. --namespace= shows one namespace instead of the default one, --namespace='*' shows all of them interleaved, and a leading plus, as in +myapp, shows that namespace and the default one together.

journalctl --namespace=myapp

The flag needs systemd 245 or newer. A namespace exists only when a unit is set up to use one, so on a plain install the default namespace is all you will find.

Further reading: journalctl(1) 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