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 --header shows what is inside the journal files

Journalctl
~/tips/tip-journalctl-header-journal-file-info

journalctl --header | head -20

Prints the header information of the journal files instead of log entries.

When entries look out of order, the files themselves tell more than the log lines.

--header prints internal information about the files journalctl would read: the path, the file ID, the machine and boot IDs and the entry counts. The man page names it as a tool for finding out-of-order entries, which happen when a machine boots with the wrong clock.

journalctl --header | head -20

Some of the output is meant for developers. Look for the file path and the first and last entry times, and ignore the rest.

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