Watchdog Service

Type/Function Reference

Service

Provides an API for monitoring critical applications and services for deadlocks and other similar faults. The watchdog for a process is started by calling le_wdog_Kick or le_wdog_Timeout. Once started, the watchdog must be kicked periodically by calling le_wdog_Kick. If the watchdog is not kicked (because it is deadlocked, for example), the watchdog service will attempt to recover the service by killing the process and executing the action specified in the process' watchdogAction (if specified) otherwise its faultAction.

Generally a service which uses the watchdog should set watchdogTimeout to give the default timeout, and watchdogAction to give a recovery action.

Critical services should also set maxWatchdogTimeout. In this case the watchdog will be started on system boot, and cannot be stopped or set longer than the timeout given in maxWatchdogTimeout. This ensures the service is always running as long as the system is running.

Note
If maxWatchdogTimeout is not set, no more action is taken if performing the process' watchdogAction doesn't recover the process. If maxWatchdogTimeout is specified the system will be rebooted if the process does not recover.