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 -o short-monotonic counts seconds since boot

Journalctl
~/tips/tip-journalctl-output-short-monotonic

journalctl -b -o short-monotonic

Prints seconds since boot as the time stamp, which reads well for startup problems.

Wall clock time can jump when a server syncs its clock. Time since boot never does.

short-monotonic replaces the date and time with seconds since boot, like [ 821.084309]. It is the same kind of stamp as dmesg and it makes boot problems easy to read, because you see how many seconds a step took.

journalctl -b -o short-monotonic

The numbers only mean something inside one boot. To compare two boots, go back to a format with wall clock time.

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