Modern
PCs and laptops contain health
monitoring chips and sensors.
These sensors can monitor temperature
and voltages of
motherboard, CPU and hard disk drives.
They can also report and control the rotation speed of cooling fans.
Take a look at this picture.
It displays some vital temperature values and speed of cooling fans on
the
toolbar.
This
guide will show
you how to utilize hardware sensors in Ubuntu Linux.
1)Install lm-sensors package
lm-sensors package
detects the sensor chipsets and settles appropriate drivers for them. lm-sensors has
also ways to read and name the sensor values.
Update package index
and upgrade your system. Run command
sudo aptitude update
&& sudo aptitude -y upgrade
Then
install lm-sensors package. Run command
sudo aptitude install lm-sensors
2)
Do configuration
Detect available sensor chipsets in your computer and
create a configuration file, /etc/sensors3.conf. Run
command
sudo sensors-detect
I
simply answer Y to all questions. Press the [ENTER] key
and answer Y (yes) to all questions.
It is quite important that you answer yes
to the last question so the values are saved in /etc/sensors3.conf
(the configuration file). Do you want to add
these lines automatically? (yes/NO): yes
This step will also write the drivers (module) names in the
/etc/modules file.
The drivers will be then loaded at next startup.
Check your /etc/modules
file. Run
cat /etc/modules
The
output should be something like this
#
/etc/modules: kernel modules to load at boot time. ... ...
#
Generated by sensors-detect on Tue Jun 1 10:52:37 2009 #
Chip drivers w83627ehf coretemp
In this case it
added two modules; w83627ehf and coretemp. The modules and names are
totally hardware (motherboard and CPU) dependent.
You can also check the /etc/sensors3.conf
file. Just read it through.
3)
Reboot your computer
Reboot
your computer to load the sensor drivers (modules).
You could also load the modules manually without rebooting.
The configration step above reported the module names so you
could load them manually with the modprobe command. In this example case,
I would do
sudo
modprobe w83627ehf sudo modprobe
coretemp
4)
Test the sensors
Test
the senors by
running
sensors
The output should be something like this: w83627dhg-isa-0290 Adapter:
ISA adapter VCore:
+1.10 V (min = +0.00 V, max = +1.74 V) in1:
+12.09 V (min = +7.18 V, max = +3.59 V)
ALARM AVCC:
+3.31 V (min = +0.00 V, max = +3.07 V)
ALARM 3VCC:
+3.31 V (min = +0.64 V, max = +2.16 V)
ALARM in4:
+1.58 V (min = +1.15 V, max = +1.23 V)
ALARM in5:
+1.55 V (min = +0.07 V, max = +1.41 V)
ALARM in6:
+4.97 V (min = +1.64 V, max = +1.92 V)
ALARM VSB:
+3.31 V (min = +2.75 V, max = +2.56 V)
ALARM VBAT:
+3.25 V (min = +0.14 V, max = +1.79 V)
ALARM Case
Fan: 727 RPM (min = 6026 RPM, div = 16)
ALARM CPU
Fan: 1493 RPM (min = 7336 RPM, div = 8)
ALARM Aux
Fan: 0 RPM (min =
50 RPM, div = 128) ALARM fan4:
0 RPM (min = 81 RPM, div = 128) ALARM fan5:
860 RPM (min = 474 RPM, div = 16) Sys
Temp: +43.0°C (high = +8.0°C,
hyst = +74.0°C) sensor = thermistor CPU
Temp: +33.5°C (high = +80.0°C, hyst =
+75.0°C) sensor = diode AUX
Temp: +127.0°C (high = +80.0°C, hyst =
+75.0°C) ALARM sensor = thermistor cpu0_vid:
+1.125 V