I wrote a small script to use the above info to see if the miner has stopped hashing and reboot automatically when it does.
1. SSH into your miner. I use putty (
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
2. Login to the miner
3. type cd /bin
4. type vi hashcheck
5. paste the following code (in bold) into the vi editor
#!/bin/ash
var=$(cat /proc/loadavg | grep . | cut -c 1)
if [ $var -lt 1 ]
then
/sbin/reboot
else
fi6. Press the Esc key
7. Type :x and then press enter
8. Close putty
9. Now access your miner via the web interface
10. Click the system tab
11. Click Scheduled Tasks
12. Under
*/3 * * * * /usr/bin/cgminer-monitor add the following on the next line
*/1 * * * * /usr/bin/hashcheck13. Click Submit in the bottom right hand corner
That's it. Now your miner will run this script every minute. If the miner has stopped hashing the script will return a value of 0 causing the miner to reboot automatically.
As long as the miner is hashing the script will return the number 2 and nothing will happen.