Skip to content

This are a few lines of Python code to set hardware Watchdog in Linux.

License

Notifications You must be signed in to change notification settings

Andermutu/pyWatchdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

pyWatchdog

This are a few lines of Python code to set hardware Watchdog in Linux.

If you want to set Watchdog in Linux please copy or download Watchdog+.py file.

This library does not require any special or additional libraries.

Then run it. It will establish connection with the selected Watchdog device. First the Python script will set the Watchdog timeout in 8 seconds ( for diferent timeouts please consult drivers options).Then it will feed Watchdog for 8 seconds. After that the system will reboot after timeout (8 seconds). To real implementation set mywatchdog.keepalive() in a while True loop. So that system will only reboot if it crashes or the program breaks.

This implementation is based on https://github.com/zalando/patroni API.

About

This are a few lines of Python code to set hardware Watchdog in Linux.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages