Hosting Operations
Read-onlySpot Stale systemd Timers
A timer may exist but have no next scheduled run, which can hide disabled or stale automation.
Command
systemctl list-timers --all --no-pager --plain | awk 'NR==1 || $1=="n/a" || /backup\.timer|logrotate\.timer/'
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not assume n/a is always bad; some timers are intentionally inactive until enabled or triggered.
Expected output
Timer rows including n/a NEXT values and important scheduled jobs.
System impact
Read-only. Nothing changes. The command filters the timer list for stale-looking and important automation rows.
Recovery / rollback: no state is changed.
When to use it
Use when backups, reports, renewals, or cleanup jobs stopped running after a migration or package change.
When not to use it
Do not assume n/a is always bad; some timers are intentionally inactive until enabled or triggered.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ 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.
$ systemctl list-timers --all --no-pager --plain | awk 'NR==1 || $1=="n/a" || /backup\.timer|logrotate\.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
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
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
systemctl list-timers --all --no-pager --plainsystemctl list-timers --all --no-pager --plain | awk 'NR==1 || $1=="n/a" || /backup\.timer|logrotate\.timer/'
next steps
Related commands
Map systemd Timers to Services
A timer is only half the scheduled job. The service is the payload.
systemctl list-timers --all --no-pager --plain | awk 'NR==1 || /\.timer/ {print $(NF-1), "->", $NF}'
List Upcoming systemd Timers
Cron is not the only scheduler on modern Linux servers.
systemctl list-timers --all --no-pager
Group Journal Errors by Unit
A noisy incident usually has a noisy source.
journalctl -p err..alert --since "2 hours ago" --no-pager -o short-iso | awk '{split($3,a,"["); unit=a[1]; count[unit]++} END {for (u in count) print count[u], u}' | sort -nr
Check Failed Dependencies for a Service
Sometimes the service is only the messenger for a failed dependency.
systemctl list-dependencies app-worker --failed --no-pager
Print Runtime Paths and User From systemd
Confirm the user, working directory, env file, and ExecStart systemd is actually using.
systemctl show app-worker --property=FragmentPath,DropInPaths,EnvironmentFiles,ExecStart,User,WorkingDirectory --no-pager
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.