Watchdog Linux



The Linux software watchdog is a timer that continuously counts down from a specified start value. Once it reaches zero a function named “watchdogfire” is called that logs the event and initiates a hard reset. A watchdog daemon is therefore needed to. Linux Watchdog Support. HPE iLO NMI Watchdog Driver; Mellanox watchdog drivers; Berkshire Products PC Watchdog Card; The Linux Watchdog driver API; The Linux WatchDog Timer Driver Core kernel API; WatchDog Module Parameters; The Linux WatchDog Timer Power Management Guide; WDT Watchdog Timer Interfaces For The Linux Operating System.

This document describes how to test the pretimeout feature with a software watchdog

What Is Watchdog Linux

The watchdog device requires an additional driver and management daemon in the guest virtual machine. As merely enabling the watchdog in the libvirt configuration does not do anything useful on its own. Currently there is no support notification when the watchdog fires. Watchdog in the Services List. When an irregularity in a metric is detected, the yellow Watchdog binoculars icon appears next to the affected service in the APM Services List. The number next to the binoculars indicates the number of issues Watchdog has noticed within that service.

Prepare the kernel

Linux Watchdog Example

The patches landed upstream in v4.9-rc1. In case the needed patches are not in your version of renesas-drivers, here is thetopic branch [1].

Activate pretimeout in the kernel config. Here is the selection from the watchdog submenu:

Watchdog Linux

Prepare the root filesystem for your target

The root filesystem only needs busybox. v1.24.2 was used here in this example. The following patch is currently needed for the '-P' parameter of the watchdog utility.It will be upstreamed when the Linux Kernel parts are upstream.

Check if pretimeout govenors are available

After booting the kernel and logging in, list the govenors:

Linux Hardware Watchdog

Note: We assume here watchdog0 is the software watchdog. If this is not the case, please replace all 'watchdog0' with your watchdog device.

Check if pretimeout govenors can be selected

Start the watchdog with setting causing a pretimeout

Please remember that the pretimeout is specified in seconds before the timeout.So we will generate a pretimeout here, because: Timeout is 10 seconds (-T 10). Pretimeout is 8 seconds (-P 8), meaning a pretimeout notification will be generated after 2 seconds.A ping will be generated every 3 seconds (-t 3), so it is after the pretimeout notification but before the actual timeout.

Watchdog Linux

Check if proper pretimeout value can be read from sysfs

Retrieved from 'https://elinux.org/index.php?title=Tests:Watchdog-Pretimeout&oldid=422246'