6.5. Watchdog Timer Plugin

The watchdog timer plugin provides OpenHPI access to the software watchdog timer "softdog" in the Linux kernel.

The watchdog plugin follows the standard plugin naming conventions. It is called watchdog in the OpenHPI tree and should be referenced using libwatchdog in OpenHPI configuration files.

The watchdog plugin code can be tested using examples/list_resources.c as well as examples/test_watchdog.c run as root.

6.5.1. Prerequisites

As with other plugins, the watchdog plugin needs to be enabled during the OpenHPI build process via the configure flag --enable-watchdog when running ./configure.

The watchdog plugin relies on the softdog functionality, which must be compiled as a module in the Linux kernel (tested with 2.6 kernel).

After the watchdog is compiled, it needs to be inserted using insmod softdog [soft_noboot=1] as root. The soft_noboot=1 option can be used during testing so that the meachine does not reboot.

The watchdog module should be created using mknod /dev/watchdog c 10 130 as root.

6.5.2. Configuration

Below is an example configuration stanza:

plugin libwatchdog

handler libwatchdog {
          name="0"
          addr="/dev/watchdog"
          entity_root = "{ROOT,0}{SYSTEM_CHASSIS,0}"
}