Ubuntu – Limit CPU usage in terms of temperature


I run distributed computing projects, which typically want to use 100% of the CPU. How do I limit the CPU usage in terms of temperature instead of percent usage? Also, what is the maximum safe temperature to keep an Intel i5 running 24/7? (With no CPU limit FahCore_a4 causes this machine to run at 82 degrees Celsius.)

Best Answer

On this webpage there is a bash script that will attempt to keep your CPU below a specified temperature. http://seperohacker.blogspot.com/2012/10/linux-keep-your-cpu-cool-with-frequency.html

You just need to provide it with your desired maximum temperature, and it will throttle your CPU(s) in an effort to stay below that temperature.

Shameless plug- I wrote and maintain the above script.