Recently I've started mining litecoins. My miner consists of 3 Radeon R9 290x GPUs. From time to time one of them (not a specific one, it happens randomly) stops mining. Usually restarting cgminer (mining program) doesn't help, the only thing that helps is reboot. Next week I'm leaving for 8 days and I have nobody to do that for me so I thought of a script that would do that automatically.
The script would have to periodically verify if all GPUs are working and if not - reboot.
I think temperature reading is the easiest thing to determine if all cards are working. I know how to read temperature, reboot, add stuff to cron. What I don't is how to put it all together.
Get temperature command:
aticonfig --odgt --adapter=all | grep Sensor:
Output looks like this:
Sensor: Temperature - 77.00 C
Sensor: Temperature - 77.00 C
Sensor: Temperature - 77.00 C
I would like the script to read the numerical value and reboot if it drops below XX.
Can you please help me out?