Any way to register application with systemd watchdog at runtime ? I mean don't use systemd unit file, via systemd API for example

Linux watchdog is used for system reset only ? Can it be used for application reset ?

2 Answers 2


Systemd's watchdog can be mainly used for 3 different actions:

  • hardware reset (leveraging the CPU hardware watchdog exposed at /dev/watchdog). This is enabled by the RuntimeWatchdogSec= option in /etc/systemd/system.conf
  • application reset, as long as this is foreseen in the systemd unit definition
  • system reset as a fallback measure in response to multiple unsuccessful application resets. Also defined in the systemd unit

example unit file:

Description=My Little Daemon


The example is taken from: http://0pointer.de/blog/projects/watchdog.html, which gives a pretty complete overview of what and how you can use the watchdog service.

  • 1
    Example how to actually implement software watchdog for application reset would be useful. That Example unit file doesn't help at all out of context. Feb 23, 2020 at 21:37

The Linux watchdog daemon should be used for system reset jobs, though it can also run a "repair binary" on persistent errors that could be used to fix or restart a process. Generally speaking, to monitor daemon processes and restart them you should use the init/upstart/systemd supported methods as already answered and keep the watchdog operation for the most serious "only a reboot is likely to fix things" situations.

  • Nice to know, thanks Paul.
    – solr
    Jun 26, 2021 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.