<p>     Robert,<br>
     Thank you very much for that script.<br>
     God Bless,<br>
     Gavin Howard</p>
<div class="gmail_quote">On Jun 5, 2012 11:11 AM, &quot;Kovacsics Róbert&quot; &lt;<a href="mailto:kovirobi@gmail.com">kovirobi@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Seems it did not like the attachment, so here it is:<br>
#!/bin/bash -x<br>
<br>
declare -a STOPPED_PIDS<br>
<br>
temp=($(cat /sys/class/thermal/thermal_zone*/temp))<br>
OLDIFS=$IFS<br>
IFS=&quot;<br>
&quot;<br>
for i in &quot;${temp[@]}&quot;; do<br>
    if [ &quot;$i&quot; -gt 95000 ]; then<br>
        cpu_hog=($(ps a -o pid --sort -cp | grep -v &quot;PID&quot;))<br>
        ps=$(echo ${cpu_hog[0]} | grep -o &quot;^[[:space:]]*[[:digit:]]*&quot;)<br>
        STOPPED_PIDS[${#STOPPED_PIDS[@]}]=$ps<br>
        echo ${STOPPED_PIDS[@]}<br>
        kill -19 ${STOPPED_PIDS[@]}<br>
        /usr/bin/logger &quot;Stopped ${STOPPED_PIDS[@]} because of high<br>
CPU temperature&quot;<br>
        ( sleep 2m; kill -18 ${STOPPED_PIDS[@]}) &amp;<br>
        sleep 5s<br>
        break;<br>
    fi<br>
done<br>
IFS=$OLDIFS<br>
sleep 10s<br>
exec $0<br>
_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</blockquote></div>