fesa-core  7.0.0
fesa::Watchdog Class Reference

#include <Watchdog.h>

Static Public Member Functions

static void start ()
 

Detailed Description

This class provides a watchdog service that ensures that all the threads of the process including those at the lowest priority are able to run at least once within a pre-defined period. Currently, the period is 5 minutes. If it turns out that threads at the lowest priority cannot run at least once during the period, a stack trace dump of all the threads will be initiated and written in a file in /dev/shm. The file name is fesa_watchdog_dump-<pid> where <pid> is the PID of the monitored FESA process. After the dump, the watchdog will kill the process, first with SIGTERM and finally with SIGKILL if the process did not quit after 2 seconds.

One starts the watchdog by calling Watchdog::start(). The watchdog cannot be stopped.

Implementation details: The start method will create two new threads. WatchdogKeeper, responsible of keeping the system alive, and WatchdogChecker, responsible of checking that the system is alive. The keeper runs at the lowest priority and the checker at the highest to ensure that the checks can always be performed. If the system becomes overloaded (due to the FESA process or another one), the keeper will not be scheduled (lowest prio). The checker will detect it and trigger the watchdog.

Member Function Documentation

void fesa::Watchdog::start ( )
static

Starts the watchdog


The documentation for this class was generated from the following files: