Skip to content

Plugin system watchdog

Martin Pihrt edited this page Oct 13, 2026 · 1 revision

System Watchdog

Configures and monitors the Raspberry Pi hardware watchdog to recover from system lockups.

At a glance

Item Value
Version 1.0.0
Category Network, data and system maintenance
Author Martin Pihrt
License GPL-3.0
OSPy 3.0.211 or newer
Python 3.8 or newer
Permissions network, files, subprocess, system
Hardware platforms: raspberry_pi; interfaces: hardware_watchdog
Dependencies None
Python/OS packages None
Interfaces No provider or mobile API declared
Source Open the plug-in directory

What it is for

Configures and monitors the Raspberry Pi hardware watchdog to recover from system lockups.

How it works and how to configure it

Tested in Python 3+

The plug-in includes a plugin.json manifest and reports its monitoring worker, watchdog package, service, device, latest check and errors through the OSPy system health interface.

Attention: it depends on the version of Raspberry Pi! whether it is version 2, 3, 4... (version 4 is not stable).

This plugin enable or disable HW Watchdog daemon in OSPy system. On the Raspberry Pi is hardware watchdog - Broadcom BCM2708 chip. This can be very useful if your Raspberry Pi is located remotely and locks up. However, this would not the preferred method of restarting the unit and in extreme cases this can result in file-system damage that could prevent the Raspberry Pi from booting. If this occurs regularly you better find the root cause of the problem rather than fight the symptoms. The watchdog daemon will send /dev/watchdog a heartbeat every 4 seconds. If /dev/watchdog does not receive this signal it will brute-force restart your Raspberry Pi. This plugin needs Watchdog. If not installed Watchdog, plugin installs Watchdog in to the system himself.

Plugin automatic installation setup:

Plugin sets in the OS system:

  • echo 'bcm2708_wdog' >> /etc/modules
  • sudo modprobe bcm2708_wdog
  • sudo apt-get install -y watchdog chkconfig
  • sudo chkconfig watchdog on
  • sudo nano /etc/watchdog.conf
  • Saving config in to file: /etc/watchdog.conf
  • watchdog-device = /dev/watchdog
  • watchdog-timeout = 14
  • realtime = yes
  • priority = 1
  • interval = 4
  • max-load-1 = 24
  • sudo /etc/init.d/watchdog start

Options (/etc/watchdog.conf)

  • interval = 4 Set the interval between two writes to the watchdog device. The kernel drivers expects a write command every minute. Otherwise the system will be rebooted. Default value is 4 seconds. An interval of more than a minute can only be used with the -f command-line option.

  • max-load-1 = 24 Set the maximal allowed load average for a 1 minute span. Once this load average is reached the system is rebooted. Default value is 0. That means the load average check is disabled. Be careful not to this parameter too low. To set a value less then the predefined minimal value of 2, you have to use the -f commandline option.

  • watchdog-device = /dev/watchdog Set the watchdog device name. Default is to disable keep alive support.

  • realtime = yes If set to yes watchdog will lock itself into memory so it is never swapped out.

  • priority = 1 Set the schedule priority for realtime mode.

Watchdog daemon

For test type in command (ex: via Putty): : (){ :|:& };:

In-app help and settings notes

The following notes are generated from the help page shipped with this plug-in. Field names are also explained directly in the OSPy settings page.

This plugin enable or disable HW Watchdog daemon in OSPy system. On the Raspberry Pi is hardware watchdog - Broadcom BCM2708 chip

This can be very useful if your Raspberry Pi is located remotely and locks up. However, this would not the preferred method of restarting the unit and

in extreme cases this can result in file-system damage that could prevent the Raspberry Pi from booting. If this occurs regularly you better find the root

cause of the problem rather than fight the symptoms. The watchdog daemon will send /dev/watchdog a heartbeat every 4 seconds. If /dev/watchdog does not

receive this signal it will brute-force restart your Raspberry Pi. This plugin needs Watchdog. If it is not installed, use the Install Watchdog button on the plug-in page.

Support

Check OSPy → Diagnostics first and remove passwords, tokens, private addresses and other secrets before sharing logs. Report reproducible plug-in problems in the OSPy-plugins issue tracker.

Back to the plug-in catalog

Clone this wiki locally