I have seen many people asking about getting USB hardware watchdogs working. This guide is intended to get you started.
I will be using the following watchdog in this tutorial, but I will do my best to make it agnostic.
- Power down your mining rig.
- Connect the USB hardware watchdog to both the USB port and the power terminals.
- Boot the mining rig.
- Once system boots, either SSH or KVM into Rig.
- Issue the following command to see if the watchdog was recognized.
journalctl -u hive | grep -Pzo ".*\>.*watchdogs(.|\n)*(?=\n.*\>.*Applying)"
Aug 26 13:52:48 B01-R02-MNR-07 hive: > Detecting watchdogs
Aug 26 13:52:49 B01-R02-MNR-07 hive: Watchdogs InUa found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive: OpenDev Watchdogs found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive: Esonics Watchdogs found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive: QinHeng Electronics HL-340 Watchdogs found: 1
Aug 26 13:52:49 B01-R02-MNR-07 hive: Found on port /dev/china_dog0
Aug 26 13:52:49 B01-R02-MNR-07 hive: Not found config /hive-config/watchdog_srrv2.txt
- Find out which type of watchdog you have. In the above example, there is a QinHeng watchdog installed.
- Change to the watchdog directory.
Pick the appropriate watchdog.
e1000e/ esonics/ k10temp/ ohgodapill/ opendev/ qinheng/ srrv2/ watchdoginua/
- Find out what the name of the executable is for your watchdog.
- Check to make sure the process is running.
ps -ef | grep hl340
root 1701 1 0 Aug26 ? 00:00:23 bash /hive/opt/qinheng/hl340 ping /dev/china_dog0
- Test the watchdog (the port that you are pinging will be in the output of the process above)
./hl340 ping /dev/china_dog0
You should see your watchdog light blink when it receives a ping.
- Check to make sure the watchdog is running correctly. (the process ID should be the one from the above output)
strace -p 1701 -e write
If there is an issue with the watchdog, you may have to try the following steps.
- Identify what port the USB watchdog is using.
The watchdog should be listed here.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0781:5583 SanDisk Corp.
Bus 001 Device 004: ID 5131:2407
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
- Determine which type of watchdog you have and change to the appropriate directory.
- Modify the shell script to include the Bus ID of the USB watchdog.
add your BUS ID
- Restart computer and test again.