Don't mean to bump old threads, but just thought I would add some changes I made to the script I have been running as it was slightly annoying and costly when I couldn't get to the box quick enough to reboot it, so here is the new script:
cd /home/
MIN="40"
TEMP0=$( DISPLAY=:0 aticonfig --odgt --adapter=0 | grep -oE '[0-9]{2}[.][0-9]{2}' | sed -r 's/([0-9]*).*/\1/g' )
TEMP1=$( DISPLAY=:0 aticonfig --odgt --adapter=1 | grep -oE '[0-9]{2}[.][0-9]{2}' | sed -r 's/([0-9]*).*/\1/g' )
TEMP2=$( DISPLAY=:0 aticonfig --odgt --adapter=2 | grep -oE '[0-9]{2}[.][0-9]{2}' | sed -r 's/([0-9]*).*/\1/g' )
TEMP3=$( DISPLAY=:0 aticonfig --odgt --adapter=3 | grep -oE '[0-9]{2}[.][0-9]{2}' | sed -r 's/([0-9]*).*/\1/g' )
FAILVAL=$(cat /home/
if [ "$TEMP0" -lt "$MIN" -o "$TEMP1" -lt "$MIN" -o "$TEMP2" -lt "$MIN" -o "$TEMP3" -lt "$MIN" ]; then
if [ "$FAILVAL" -eq "0" ]; then
echo > .TCStore
echo "1" > .TCStore
elif [ "$FAILVAL" -eq "1" ]; then
echo > .TCStore
echo "2" > .TCStore
elif [ "$FAILVAL" -eq "2" ]; then
echo > .TCStore
echo "0" > .TCStore
reboot
echo "ALERT: FAIL VALUE REACHED 3 ON
else
echo "$(date) - ERROR: FAILVAL = $FAILVAL - setting it back to 0" >> .FailValLog
echo > .TCStore
echo "0" > .TCStore
else
echo > .TCStore
echo "0" > .TCStore
echo "$(date) - gpu0 = $TEMP0, gpu1 = $TEMP1, gpu2 = $TEMP2, gpu3 = $TEMP3" >> tempLog
fi
Still fairly primitive but seems to get the job done. I have also slightly changed times cron runs from every 15 minutes to every 20 minutes which I feel is better due to the fact the actual pool could be the cause of GPU's not mining and not the GPU's themselves. Basically having this script and cron running it every 20 minutes would mean that if there was any 60 minute period where any of the GPU temps were down to a level I can safely say there is no mining going on the rig reboots itself. This could obviously been refined so that separate GPU temps and their consecutive low temps were logged making it more accurate, however, this currently works for me and I don't really care enough to refine it.
Happy mining folks,
JG
EDIT: Forgot to mention, obviously I have some start-up scripts than start my miners and do some overclocking - If you don't have this, you would need to implement it for this script and technique to be useful.