Back to lessons

Linux Survival Basics

Map systemd Timers to Services

systemctl list-timers shows timer units, but you need to see what service each timer activates.

Command

systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /\.timer/ {print $(NF-1), "->", $NF}'

What changed

Nothing changes. The command condenses timer rows into timer-to-service mappings.

Danger

safe

When to use it

Use when auditing scheduled work on modern Linux systems that may not rely only on cron.

When not to use it

Do not use it to inspect the service definition itself; follow up with systemctl cat on the unit.

Undo or recovery

No undo needed because the command is read-only.

Expected output

Mappings such as backup.timer -> backup.service.

demo script

Disposable terminal steps

  1. systemctl list-timers --all --no-pager --plain
  2. systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /\.timer/ {print $(NF-1), "->", $NF}'

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ systemctl list-timers --all --no-pager --plain
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
Fri 2026-06-26 00:05:00 CDT  9h left  Thu 2026-06-25 00:05:00 CDT  14h ago certbot.timer        certbot.service
Thu 2026-06-25 23:50:00 CDT  8h left  Thu 2026-06-25 00:00:10 CDT  14h ago logrotate.timer      logrotate.service
n/a                          n/a      Mon 2026-06-22 01:00:00 CDT  3 days ago stale-report.timer stale-report.service
4 timers listed.
::exit-code::0
$ systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /\.timer/ {print $(NF-1), "->", $NF}'
UNIT -> ACTIVATES
backup.timer -> backup.service
certbot.timer -> certbot.service
logrotate.timer -> logrotate.service
stale-report.timer -> stale-report.service
::exit-code::0

YouTube Short

Timers are not the job.

The timer decides when. The service decides what. Map them before you debug the wrong unit.

LinkedIn hook

A timer is only half the scheduled job. The service is the payload.

Question: When auditing scheduled work, do you map timers to services explicitly?

experiments

A/B tests to run

Metric: save_rate

A: The timer is not the payload.

B: Map systemd timers to services.