TS-4900 Watchdog

From embeddedTS Manuals
Revision as of 15:33, 16 December 2022 by Mark (talk | contribs)

The watchdog is a timer that can help ensure the system remains stable and responsive. This can be used as a last resort to reset the system if it detects a certain process or application is not responding as expected.

Our images typically do not feed the watchdog by default, but this can be brought into your image by feeding the watchdog from your application. The kernel provides an interface to the watchdog driver at /dev/watchdog. Refer to the kernel documentation for more information:

By default the watchdog has a 60 second timeout and daemons like systemd will aggressively feed the watchdog more often than that. The CPU watchdog timer runs off of a ring oscillator in the CPU which does not provide a lot of accuracy. The ring oscillator may be up to 2x the intended frequency, so a 60 second timeout may expire in as little as 30 seconds. Your watchdog should then generally be fed at least 4x faster than your configured watchdog timeout. For example, if the timeout is 60 seconds the watchdog should be fed at least every 15 seconds to ensure that it does not expire.