The UHF of the film world.
Latest news

quietearth [General News 10.01.06]

Pin It Share on Google+


One of the basic things you need, especially if you build your own boxes like I do, is to be able to watch cpu temperatures, voltages, fan speeds, etc. This is easily done with the lm-sensors package in conjuction with code which is available for most types of motherboards in the kernel. This is pretty straightforward, first off lets install lm-sensors:
# apt-get install lm-sensors

Once that's done we need to create the i2c device files and unfortunately this isn't done automatically, so we can grab the necessary script from the lm-sensors source package, use this link, or cut-n-paste this:
--cut here--
#!/bin/bash


# Here you can set several defaults.

# The number of devices to create (max: 256)
NUMBER=32

# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600

# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi

i=0;

while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
--cut here--


After running that script, we can then run sensors-detect to figure out our motherboard type:
# sensors-detect

This might hang your system while probing for the right motherboard, but if it doesn't all the questions are pretty straightforward and you can usually just hit enter for everything. At the end it will ask if you want to add the necessary kernel modules to /etc/modules, answer YES. You can then reboot to load everything, or take a look at /etc/modules and manually modprobe each one IN THE ORDER it's in the file. Then run the sensors command and we get this:
# sensors
V1.5:      +2.467 V  (min =  +1.42 V, max =  +1.58 V)   ALARM
VCore:     +1.479 V  (min =  +1.48 V, max =  +1.63 V)   ALARM
V3.3:      +3.373 V  (min =  +3.13 V, max =  +3.47 V)
V5:       +5.000 V  (min =  +4.74 V, max =  +5.26 V)
V12:      +11.734 V  (min = +11.38 V, max = +12.62 V)
CPU_Fan:   2299 RPM  (min = 4000 RPM)                     ALARM
fan2:         0 RPM  (min =    0 RPM)
fan3:      1057 RPM  (min =    0 RPM)
fan4:         0 RPM  (min =    0 RPM)
CPU:      +41.50°C  (low  =   +10°C, high =   +50°C)
Board:    +35.25°C  (low  =   +10°C, high =   +35°C)
Remote:   +35.50°C  (low  =   +10°C, high =   +35°C)     ALARM
CPU_PWM:   144
Fan2_PWM:  112
Fan3_PWM:  112
vid:      +1.550 V  (VRM Version 9.0)


If you want to monitor things under gnome their is a handy applet for that:
# apt-get install sensors-applet

But really at this point you should reboot. If you need to change incorrect scaling or set temperature lower/upper limits, just modify /etc/sensors.conf.

Tested under dapper and edgy.
Under feisty, you do not need to install any packages or run the above script. Just run sensors-detect and reboot. The sensors applet is the same place as always.

Pingbacks


You might also like

avatar

tiamatu (7 years ago) Reply

Thanks very much. That was just what I needed.

avatar

Anonymous (7 years ago) Reply

It might be worth noting that you mostly need to reboot between running sensors-detect and running sensors, especially if the ISA bus driver needed to be loaded.
For people who are new to Gnome desktops (like Ubuntu) you get sensors-applet appearing by right-clicking on the bar at the top of the screen and selecting "Add to Panel...", then selecting the "Hardware Sensors Monitor" in the "System and Hardware" section.

avatar

Joe (7 years ago) Reply

What a great resource! Allways wanted to add temp/fan monitoring to my Dapper system!

Thanks!

avatar

greg (7 years ago) Reply

thx

avatar

Anonymous (7 years ago) Reply

Thanks, was very informative but could not find any sensors for my generic rebranded crap laptop. Will have to keep trying.

avatar

Anonymous (6 years ago) Reply

I don't think you need to reboot. After sensors-detect, I think you can just modprobe the modules that it adds to your /etc/modules.

avatar

Anonymous (5 years ago) Reply

thanks it's verry usefull

avatar

chuckles (5 years ago) Reply

grr, i have an AMD K10 something-or-other, according to this, the drivers for which are 'to-be-written'. pretty good MSI motherboard which i plan to overclock the hell out of... it would be nice to have some real-time desktop monitoring capability. oh well :-P

avatar

sin2x (4 years ago) Reply

brilliant

avatar

thomass (4 years ago) Reply

thanks a lot, a very useful and simple How to..

avatar

WinDhy (10 months ago) Reply

If you go down the burglar alarm route the soesnrs you will need are:- magnetic door catches- magnetic window catches- window/door shock detectors- PIR motion dectors- smoke alarm detectors- carbon monoxide detectors


Leave a comment