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-delta shows the gap between each line and the one before

Journalctl
~/tips/tip-journalctl-output-short-delta-gaps

journalctl -b -o short-delta -u myapp

Prints the time since the previous entry on every line, to find long pauses and timeouts.

Instead of subtracting time stamps in my head, I let journalctl print the pause between lines.

short-delta works like short-monotonic but adds the time difference to the previous entry, for example < 437.083163 >. A big number marks a long wait, which makes slow starts and timeouts easy to spot.

journalctl -b -o short-delta -u myapp

Differences that may be unreliable are marked with a star. The format needs systemd 252 or newer.

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