Timur Izhbulatov — Independent Electronic Music


The watchdogdev extension module is an implementation of Linux watchdog device API for Python. The module includes watchdog object type which provides wrapper methods for ioctl commands as well as simple write access to the device.


If you have setuptools installed, just use the easy_install command:

$ easy_install watchdogdev
Available eggs: You can also download the source tarball: watchdogdev-0.11.tar.gz. Or get the latest version from Subversion repository:
$ svn co http://timka.org/svn/watchdogdev/trunk watchdogdev

The module can be installed using standard distutils setup script:

$ python setup.py install
Alternatively, it is possible to install the module using setuptools:
$ python setup_egg.py install


Make sure your watchdog driver is loaded and /dev/watchdog exists and is writeable. If you don't have a watchdog card, load the softdog driver which implements software watchdog timer:

# modprobe softdog

After that you should be able to import the module and open the watchdog device:

>>> from watchdogdev import *
>>> wdt = watchdog('/dev/watchdog')
>>> wdt.get_support()
>>> wdt.identity
'Software Watchdog'
...     wdt.magic_close()

See help(watchdogdev) for details

$Id: index.xml 137 2009-08-15 17:08:21Z timur $