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: systemctl reset-failed clears old failures from the systemd list

Systemd
~/tips/tip-systemd-reset-failed

sudo systemctl reset-failed myapp.service

Clean up the failed state of units so the list only shows current problems.

After you fix a broken unit, or remove it entirely, it can still sit in systemctl --failed with a red dot. That noise makes the next real failure easy to miss.

Reset one unit, or all of them:

sudo systemctl reset-failed myapp.service
sudo systemctl reset-failed

A unit with ExecStart=/bin/false shows up as failed. After reset-failed on it, systemctl --failed comes back empty.

It does more than tidy the list. The man page says it also resets the start rate limit counter and, for services, the restart counter. So a unit that hit Start request repeated too quickly can be started again right away once you fixed the cause, without waiting for the limit interval to pass.

Monitoring tools that count failed units, and systemctl is-system-running which says degraded as long as anything failed, both go back to normal too.

It only clears the state; the logs of the failure stay in the journal. Reset blindly with no argument and you may wipe a failure you had not looked at yet, so I’d run systemctl --failed first and reset by name.

Further reading: systemctl man page

More Systemd tips [Service] sudo mkdir -p /etc/systemd/system/service.d [Service] printf 'hunter2' | sudo systemd-creds encrypt --name=dbpass – dbpass.cred systemd-analyze timespan 1h30min All Systemd tips (88) All topics

Link