This isn't entirely a programming question but, how would one make a computer run at an inputted temperature? The machines will be running Linux for a heatsink design project.

link|improve this question
IMO the question is/can be programming related, since a solution would be to write a program that does that. – OregonGhost May 18 '09 at 15:18
I agree - how to alter and measure CPU temperature is definitely programming related. Otherwise who would write great products like Coolbook: coolbook.se/CoolBook.html – Nick Fortescue May 18 '09 at 15:27
feedback

4 Answers

Why risk a computer? Get a temperature controlled hotplate.

Some CPUs have their own internal thermal limiting and some don't. Over-temperature on the latter can cause permanent damage.

link|improve this answer
Agreed. Look at the testing methodology used by frostytech.com - those guys do great heat sink tests and comparisons with a temperature controlled hotplate. – Brent Ozar May 18 '09 at 16:06
feedback

Write a program that uses all your CPU, making it hot. Once in a while in the loop, check the CPU temperature sensor (of course you must have one then) and if the target temperature is reached, pause the "hot" operation until the temperature has fallen below the target temperature.

link|improve this answer
feedback

If you want to measure CPU temperature the lm-sensors is a library you might want to look at.

Then use the CPU aggressively to heat it up until the desired target is reached. You'll probably want to make sure this program is multithreaded to really push the CPU, and then do something mathematical in each thread. Something like Glucas will work.

Then when the desired temperature is reached stop stretching the CPU.

An even more sophisticated design would reduce or increase the load (rather than just on or off) as the temperature was different distances from the target temperature.

link|improve this answer
If you're really sure you want it hot you should take a look at cpuburn. – tstenner May 18 '09 at 15:29
lm-sensors is a good ingredient. But since a good heat-sink may prevent the CPU ever reaching a certain temperature, and since the heat-sink behavior itself is temperature-dependent (e.g. includes variable-speed fan, or varying convection patterns), instead of variable-work, fixed-temperature, you'll probably learn more by graphing variable-work, variable-temperature curves. – Liudvikas Bukys May 18 '09 at 16:01
feedback

There is a program called cpuburn, it can be found at: http://pages.sbcglobal.net/redelm/

This program is designed to heavily load a cpu (creating heat), there are different versions for each cpu, as there are more effective ways to do it on each cpu.

The source code is included, take a look at that.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown