Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

This is a utility to activate, configure and deactivate hardware watchdogs on e.g. ar91xx chipsets. This only works on watchdogs supporting the "Magic Close" feature

Instead of having the entire watchdog daemon written in C this utility let's you write your watchdog daemon as e.g. a shell or lua script and then simply call watchpuppy at the beginning of the script to initialize the watchdog.

This program has been tested on an Atheros AR9344 on OpenWRT Chaos Calmer.


watchpuppy start|stop|pat 
  -d device : Device file to open (default: /dev/watchdog)
  -t timeout: Reboot after this many seconds with no pat (default: 30)
  -b        : Report whether last reboot was triggered by watchdog, then exit.

The pat argument resets the watchdog reboot counter. You can also pat the watchdog by simply writing to the watchdog device like so:

echo "p" > /dev/watchdog

Just don't write a V character as that will deactivate the watchdog.

How to write a daemon

See for the basic structure of a watchdog script that uses watchpuppy.


Be aware that you cannot, as of January 5th 2016, use this with stable OpenWRT (Chaos Calmer) without modifying procd, since there is no way to get procd to release /dev/watchdog but you can find a modified procd here.

To get the modified procd to release /dev/watchdog simply run:

ubus call system watchdog '{ "stop": true }'

License and Copyright

Copyright 2015, 2016 Marc Juul

License: GPLv3


A watchdog utility that let's you activate, configure and deactivate a hardware watchdog



No releases published


No packages published