The AMD CS5536 Geode companion on the ALIX.3D3 board has an internal watchdog, beeing able to reboot the system by itself if it's hangup. To use this watchdog device, kernel support is needed. In kernel 2.6.29 you have to enable
Device Drivers ---> [*] Watchdog Timer Support ---> [*] Disable watchdog shutdown on close <*> AMD Geode CS5535/CS5536 Watchdog
for beeing able to use the watchdog timer. The Disable watchdog shutdown on close is optional. Usually if the watchdog program terminates it tell's the kernel to disable the watchdog and the kernel does. With this option you can prevent the kernel from disabling the watchdog.
After compiling the kernel and rebooting you have to install a software to tell the watchdog everything's fine. You can install it by
emerge -va watchdog
Afterwards you have to enable the hardware watchdog and enable realtime priority in the config file /etc/watchdog.conf
watchdog-device = /dev/watchdog realtime = yes priority = 1
Now you can start the program by
/etc/init.d/watchdog start
It now sends about every 10 seconds a ping to the watchdog device, claiming everything's fine. 🙂 You can configure the program to watch files, network, system load as well, but that's optional.
Finally do a
rc-update add watchdog boot
to start the program on each boot.
Hello,
Very nice and useful article. How could I make watchdog reboot my Alix.3d3 board? In fact, I am writing an application in C and if the program inserts a certain function, I want to keep watchdog alive. Is there a daemon that keeps watchdog alive all the time? Should I disable it to make my program work?
Thank you
Actually I have found the answer: I just had to modprobe softdog. This way, /dev/watchdog is automatically created and ioctl commands can be issued to it.