I'm not good at programming, but someone could take my concept and run with it. I have some friends who are and I'm planning on getting the following setup.
I think a raspberry pi could be programmed to ping each rig's IP address every XX minutes. If no reply, it would close a relay connected to the motherboard power switch and cause a hard shut down.
Thoughts?
I like that idea. The rig's reply should include hash rate and GPU status, so the pi (or computer) should be smart enough to decide. I mean, IF THEN, IF THEN ELSE, etc.
I saw someone set up a reed switch to do this. He can remote reboot his rigs.
You don't need to logon as root if the script is on the system, even if it isn't you should not login as root. Your script just has to run as a privileged user. You can use a simple python script ran via cronjobs to read cgminer's JSON response and act accordingly.
Are you having issues with freezing or dead GPU's? To be honest you shouldn't have to reboot at all, I would look into the issue at hand rather than putting a bandaid on it by constantly rebooting. But than I've never used BAMT, I just modified Xubuntu and it runs for weeks without issues.
The only reason I log on as root, is that's how it works with BAMT. There are two accounts on a BAMT system, root and user. I will have to experiment with the user account. You logon as user, then use SUDO, so you're root anyway. The rig doesn't do anything but mine, it uses a flash drive instead of a hard drive, so no one can store porn or mp3s on it.
I haven't had time to tweak my settings, or getting the correct drivers, but this particular version gets me the best hash rates for about anywhere between 12 to 48 hours straight, but sometimes less.
So I put the whole thing on a timer. Every 2 hours, it unplugs. Power off. After 1 minute, it turns on. BAMT boots, 20 seconds later it starts GPU 0, then GPU 1, then GPU 2, then GPU 3 ... then it starts mining, looking for work from my list of 10 pools. The first is the main pool, the rest are backup.
It didn't cost me anything to sign up or register with all those pools, and the last 3 or 4 don't even need registration (they are those so called profit switching pools.)
So my only real problem is a true power outtage, or a disconnected internet service.
When I have the few hours or days to trouble shoot and experiment with the rig and the settings (engine speed, memory clock, intensity, etc.) then I can find out what exactly is wrong.
In the mean time, it hashes at a good speed, no hardware errors, very little rejects, for about 12 hours, to about 48 hours, then suddenly one GPU goes SICK or DEAD or hashes at half the speed.
The timer or in this case, the custom software will detect this, then reboot the system.
Then it starts mining again, at top speed.
On my timer, with no admin or remote control, it just reboots, even if has no reason to do so, except that time is up, reboot.
I will have to look into Xubuntu, ... after all, BAMT is just linux, cgminer/sgminer, and AMD drivers stuffed into a flash drive image, ready to write.