Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] auto-shutdown at certain temp application?



Godwin Stewart wrote:
> On Wed, 14 Jun 2006 15:49:27 +0900, Scott VanDusen
> <Scott_VanDusen@example.com> wrote:
>
>   
>> Maybe a polling program that does
>> cat /proc/acpi/thermal_zone/THRM/temperature and if it gets to a
>> certain degree runs shutdown -h now? Has anyone heard of a program
>> that does something like this?
>>     
>
> Isn't that simple enough to write onesself? A small script using awk
> in a cron job should take care of that.
>
> Something like:
>
> #!/bin/bash
>
> TEMP=`cat /proc/acpi/thermal_zone/THRM/temperature | awk '{print $2}'`
> CUTOFF="75"
> if [ "$TEMP" -ge "$CUTOFF" ]; then
>   echo "$CUTOFF C. reached - goodbye cruel world" | /bin/mail foo@example.com
>   sleep 5
>   /sbin/shutdown -h now
> fi
>
> Or if the one-minute resolution of cron timing isn't enough then wrap
> it into a script that loops every so many seconds.
>
>   

On my TODO list was a neglected fork that read, "Get decent AC for
computer room --OR-- find a temperature gauge so machines will shut down
if crappy AC fails". Computer room has an old AC that shuts off if there
is a temporary loss of power. So machines are on UPS, but AC stops. A
few hours later, you have a silicon sauna.

Before getting distracted by other things, I looked into this problem,
and I found some websites selling ambient temperature gauges for
scientific monitoring and modder-gamer sites like
http://www.techspot.com/vb/topic13759.html that discuss chassis
temperatures, but I did not find anything as elegant as the above solution.

One question: while this would cover CPU temperature, is it safe to
assume that the ACPI reading will cover a case of overheating hard
disks? Is it possible that the ACPI could be reading only 50 or 60 while
the hard disks are dangerously over-heating? I know there is no
definitive answer to this, that it depends on the case (double intendre
intended), but what do you think?

One further question is about the temperature for the shutdown: would
75C be the sweet spot, or should it be lower to give consideration to
things like disks, other components, etc?

Micheal in Miyazaki



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links