Guide Or How To Monitor CPU Temperature in Linux

To monitor CPU temperature in Linux you will need to install lm_sensors package and then install gnome-applet-sensors (assuming you are using gnome) to get a nice graphical display. The devil is in the details. The shipped lm_sensors doesn't work on Fedora Core 6 with 2.6 kernels. It also doesn't support core 2 duo.
Install
To use lm_sensors you will have to install it from the development repository.
Login as root and run the following:
rpm -iv http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/os/Fedora/lm_sensors-2.10.3-2.fc7.i386.rpm
This will install lm_sensors on your machine. You have completed the first step.
Note: The provided version number of lm_sensors is likely to change soon. So you are better off just browsing to http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/os/Fedora/ and selecting the latest lm_sensors package for installation.
Detection
You now need to detect available sensors on your system. Run sensors-detect from command line (after logging as root).
Accept all the default values.
At the end it will print out something like:
To make the sensors modules behave correctly, add these lines to
/etc/modprobe.conf:
#—-cut here—-
# I2C module options
alias char-major-89 i2c-dev
#—-cut here—-
Add the line, as instructed, to the end of /etc/modprobe.conf file.
Ignore the other instructions. Now run:
service lm_sensors start
This will start the lm_sensors service. Now run:
sensors -s
There should be no output. Next run:
sensors
This will list available sensors and provide current sensor data.
The last two steps are for checking that the sensor detection is working correctly.
Now install gnome-applet-sensors:
yum install gnome-applet-sensors
To activate it right click on a Gnome panel and choose Add to Panel. Then select Hardware Sensors Monitor.
lm_sensors requires coretemp kernel module which is only available in 2.6.21.x kernels and above. So you will have to install the development versions of kernel to use lm_sensors in core 2 duo systems. Personally I am waiting for the 2.6.21 release version. It will soon be released.

2 comments: