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)"
Expected Output:
Aug 26 13:52:48 B01-R02-MNR-07 hive[963]: > Detecting watchdogs
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: Watchdogs InUa found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: OpenDev Watchdogs found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: Esonics Watchdogs found: 0
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: QinHeng Electronics HL-340 Watchdogs found: 1
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: Found on port /dev/china_dog0
Aug 26 13:52:49 B01-R02-MNR-07 hive[963]: 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.
cd /hive/opt/
Pick the appropriate watchdog.
e1000e/ esonics/ k10temp/ ohgodapill/ opendev/ qinheng/ srrv2/ watchdoginua/
Example:
cd /hive/opt/qinheng/
- Find out what the name of the executable is for your watchdog.
ls
Example:
hl340 hl340.sh
- Check to make sure the process is running.
ps -ef | grep hl340
Example:
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.
lsusb
The watchdog should be listed here.
Example:
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.
cd /hive/opt/qinheng/
- Modify the shell script to include the Bus ID of the USB watchdog.
nano hl340.sh
Example:
find
'1a86:7523|5131:2007|0471:2379'
add your BUS ID
'1a86:7523|5131:2007|0471:2379|5131:2407'
- Restart computer and test again.