A watchdog device monitors your computer to see if the OS is still running. If the system has locked up it will reset the system. High end servers come with built in watchdogs, for basic servers and workstations you can pick up a PCI card version for $100+ depending on features.
Basic watchdog cards receive a "Keep Alive" signal from the OS though a driver or a daemon process and they don’t hear from the process the basically hit the Reset button.
Instead of spending $100 or more, I built my own with a spare Arduino Board and $8.26 worth of parts from my local Radio Shack. Now I wouldn’t recommend this setup for an "Enterprise" environment, but its just fine for rebooting my home workstation automatically when my overclocked GPUs lock the system up while mining Bitcoins.
Step #1: InfoNext
- Everything except for the Ardunio board is available from your local Radio Shack, or if you're not impatient like me, you can order cheaper online.
- I used a proto shield , a mini bread board and some nice pre-terminated jumper wires to do the mounting, but that's all optional.
Step #2: Hardware: Wiring ArduinoNext
- Assemble the components as shown in the diagram/pictures:
- Green wires: ground -> transistor emitter, transistor collector -> relay coil.
- Red wire: +5v -> relay coil.
- Diode: relay coil (transistor side) -> +5v.
- Black wire: Arduino Digital Pin 3 -> 1K resistor -> transistor base.
- Yellow wires: Plug directly into the Reset pins on your PC motherboard, orientation doesn't matter. Don't hook this to the Motherboard until you have tested everything out.
- HINT: Be aware that the RadioShack transistor is labeled from a "bottom view" on the package. I wired it backwards the first time and had to switch the wires around to compensate for the wire diagrams "top view". Good thing I started on a breadboard :)
Step #3: Code: ArdunioNext
Step #4: Code: PC
- Download the "daemon" script and the startup/repair script
- Daemon: USBwatchdog_keep_alive.pl
- Start/Repair: repair_USBwatchdog.sh
- As this is a poor forum for inputing simple code, please see the README for full installation instructions.