Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Can't stand the heat - Monitoring CPU and computer temperature in Linux

I have a overheating problem with my desktop computer at the moment. We are experiencing some of the hotest July temperatures in the UK and my PC doesn't seam to cope. I am running Fedora FC5, and whilst it is generally OK, but if I run a CPU intensive application the temperature of the PC increases and then the computer hangs.

My laptops seam to do OK, but then by necessity they have good heat exchange systems. Desktop PCs tend to rely on blowing cold air across the system, as the air being blowed across them is not as cool as before this is causing it to overheat. In addition to the crashes I am experiencing this is probably not doing the internal components much good. My home server is also running fine, although it has a slower processor (which generates less heat), does not include a 3D graphics card and is not running flat out like my desktop PC is at times.

Although the real solution is to try and improve the cooling, at the moment I am just monitoring the temperature and am going to avoid running too many CPU intensive applications. Just running this web browser and a couple of terminals appears to have no effect, it's just major processing (like some audio converting) that causes the PC to crash.

What I have done is discover some tools that I can use to monitor the internal temperatures of the computer, so that I can try and avoid pushing the computer too far.

Command-Line Program: lcm-sensor to monitor temperature and CPU voltages etc

The first is a command-line program called lcm-sensor. I think that this was already installed on my Fedora Machine, although it may have already been added as a dependency to the GUI application (see later).

I had to install this manually on my Ubuntu PC using:
apt-get install lm-sensors

The first thing is to run /usr/sbin/sensors-detect, which goes through and detects what type of sensors are available. Note that /usr/sbin has to be in your current system path when running the sensors-detect program so that it can find the i2cdetect program. You can then start the sensor daemon using
/etc/init.d/lm-sensors start
The daemon is set to restart when your computer is rebooted.

To view the status of the current sensors run the sensors command. e.g.

$ sensors
it8712-isa-0290
Adapter: ISA adapter
VCore 1:   +1.60 V  (min =  +1.42 V, max =  +1.57 V)   ALARM
VCore 2:   +2.54 V  (min =  +2.40 V, max =  +2.61 V)
+3.3V:     +6.34 V  (min =  +3.14 V, max =  +3.46 V)   ALARM
+5V:       +4.14 V  (min =  +4.76 V, max =  +5.24 V)   ALARM
+12V:     +11.71 V  (min = +11.39 V, max = +12.61 V)
-12V:     -15.95 V  (min = -12.63 V, max = -11.41 V)   ALARM
-5V:       -8.17 V  (min =  -5.26 V, max =  -4.77 V)   ALARM
Stdby:     +4.46 V  (min =  +4.76 V, max =  +5.24 V)   ALARM
VBat:      +4.08 V
fan1:     4687 RPM  (min =    0 RPM, div = 8 )
fan2:     2481 RPM  (min = 3013 RPM, div = 8 )          ALARM
fan3:        0 RPM  (min = 3013 RPM, div = 8 )          ALARM
M/B Temp:    +42?C  (low  =   +15?C, high =   +40?C)   sensor = thermistor
CPU Temp:    +48?C  (low  =   +15?C, high =   +45?C)   sensor = thermistor
Temp3:       +71?C  (low  =   +15?C, high =   +45?C)   sensor = diode

The above shows my computers normal running temperature (at least with a room temperature of about 30°C).

Monitoring temperature and CPU / Disk / Network / memory usage using GUI based GKrellM

The GUI based application I am now using is GKrellM. This is a small GUI baesd application that shows realtime graphs and values of certain system values. The program is modular and there are all kinds of modules that can be added to give additional functionality. I have just got the built-in monitors in my setup.

The program is not installed by default, but can be added using the Add/Remove programs (or Synaptic Package Manager on Ubuntu). Although Ubuntu adds a icon on the Application Menu, Fedora doesn't seam to. It can be run from a terminal by entering the command
gkrellm &

You can add additional modules and download alternative themes. For more information see:

I may not have fixed the cooling problem, but at least I can monitor it, to see what is going wrong, and potentially to stop CPU hungry applications before it hits the dangerous temperatures.