On a default BAMT rig, running this command immediately reboots that rig.
Where the ip address is your rig. Go put your own. (Obviously, change your password, or use public key SSH protocol.)
However it leaves the file waiting, so there's a work around to it, like killing its own ssh process. I have not yet tested that.
Now, it has been pointed out that a script running from a regular cron job is going to work much better.
I simply need the script to check two things:
1. Are all GPUs hashing? Are any SICK or DEAD?
2. Are the good ones hashing above 400 kh/s (or whatever number you deem the minimum)?
If not, then reboot. If okay, then nothing, just keep mining. Cron will run again after a few minutes.
Who's got something that works? python script, perl script, bash script, doesn't matter. Ideally, I don't want to install anything that isn't already on Litecoin BAMT, but if I have to then as long as it's under 2 gigs I'll do it.
Remember that BAMT is running from a USB flash drive.
I will attempt to figure this out from the cgminer / sgminer api, but hopefully someone can show me what they already have working.
I understand this looks like a band-aid solution, but here is my thinking:
1. stable system, no issues, runs all week and all month, hashes at 400 kh/s * 5 GPUs = 2 MH/s.
2. not so stable system, runs at most 2 days then has problems, but until then, hashes at 485 kh/s * 5 GPUs = 2.425 MH/s.
3. unstable, runs up to 2 or 3 hours, hashes at 510 kh/s * 5 GPUs = 2.55 MH/s.
I'll take rig number 2 or 3 over rig number 1, as long as the band-aid works. I'll only lose 1 to 2 minutes of mining every time it restarts.
My current band-aid is a timer. It unplugs the rig for 1 minute every 3 hours. That works, but I want my band-aid to be a little bit smarter, thus scripts for checking if it really needs to do that. I can then set the timer to unplug once a day for all other problems that the script is not programmed to detect.