How to wake a linux server when the temperature drops to certain value?

1

I've been tasked with a weird problem, sending a server into sleep mode when a certain core temperature is reached, and then waking it when it cools back down to a different temperature.

I can handle a script to send the server to sleep, but how would I wake it based on a temperature change? Is that even possible?

Austin

Posted 2015-03-12T17:25:11.847

Reputation: 113

Well there's something called Wake On Lan (WOL) where the Ethernet port is looking for a certain packet ("magic packet") that will wake it on.

So you could remotely trigger the awakening. Question is how are you going to monitor the core temp. of a server that is already asleep? Seems hard but might be possible because when my laptop goes to sleep mode keyboard / mouse movement can still awakening. So obviously some sort of sub-system interrupt tracking is still possible. It'd be interesting to track the core temp. sensor in a similar way. – curious_cat – 2015-03-12T17:37:23.333

Answers

0

It's not possible to run any code when the processor is asleep, so you'll either need to use external hardware, or periodically wake the computer and check the temperature.

For external hardware, you could attach a temperature sensor to an Arduino and have it send a Wake On LAN (WOL) packet with an Ethernet shield. You could also attach it directly to the WOL header if your motherboard has one, or maybe rig it up to the power switch.

To periodically wake the computer, you could use an RTC alarm clock, check the temperature, then reset the alarm clock and go to sleep again if necessary.

Another idea, and this isn't the answer to your question but may be the answer to your problem... why not throttle the CPU clock speed when it gets hot?

Tim

Posted 2015-03-12T17:25:11.847

Reputation: 1 375