Back to lessons

Hosting Operations

Check the Last Timer Payload Logs

A systemd timer appears scheduled, but you need the recent output from the service it activates.

Command

journalctl -u backup.service -n 20 --no-pager

What changed

Nothing changes. journalctl prints the latest lines for the service unit.

Danger

safe

When to use it

Use after mapping a timer to its service and confirming the service name.

When not to use it

Do not use it as proof the next timer will run; pair it with list-timers for schedule state.

Undo or recovery

No undo needed because the command is read-only.

Expected output

Recent service log lines showing start, completion, warnings, or errors.

demo script

Disposable terminal steps

  1. systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /backup.timer/'
  2. journalctl -u backup.service -n 20 --no-pager

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /backup.timer/'
NEXT                         LEFT     LAST                         PASSED UNIT                 ACTIVATES
Thu 2026-06-25 22:00:00 CDT  7h left  Thu 2026-06-25 02:00:00 CDT  12h ago backup.timer         backup.service
::exit-code::0
$ journalctl -u backup.service -n 20 --no-pager
Jun 25 02:00:01 vps backup[1200]: started
Jun 25 02:04:42 vps backup[1200]: completed snapshot demo-20260625
::exit-code::0

YouTube Short

Read the payload logs.

The timer tells you when it fired. The service logs tell you what happened after it fired.

LinkedIn hook

When a timer fires, the useful logs are usually on the service.

Question: Do you inspect timer units first or the activated service logs first?

experiments

A/B tests to run

Metric: average_view_duration

A: The useful logs are on the service.

B: Do not stop at list-timers.