Site icon New Generation Enterprise Linux

Find those buried service crashes before they rotate out of memory

Logging & Journald

Find those buried service crashes before they rotate out of memory

đź§© The Challenge

Dealing with a service that flaps in the middle of the night is a nightmare because the logs disappear the second the unit restarts. You wake up to a green status, but the evidence of what actually exploded is gone into the void.

đź’ˇ The Fix

Use the journalctl switch that forces the pager to show you the previous boot’s lifecycle, so you can stop chasing ghosts. It captures the exit status of failed processes that standard tail commands completely miss.

journalctl -b -1 -u your-service-name.service --no-pager

⚙️ Why It Works

Adding that boot ID flag tells systemd to look back at the previous incarnation of the OS session rather than the current one. Most people forget that the journal doesn’t just clear; it keeps the history of the last time your system hardware initialized, assuming you haven’t rebooted five times since the crash.

🚀 Pro-Tip: Stick –priority=err on the end if you only care about the actual failures instead of the noisy startup chatter.

Linux Tips & Tricks | © ngelinux.com | 10/14/2026

0 0 votes
Article Rating
Exit mobile version