Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



LM-SENSORS


This is one of the more difficult/critical tweaks: LM-Sensors are for monitoring the temperatures, voltages, and fans of Linux systems with hardware monitoring devices.

Now, before we start you have to know that on some systems it is a piece of cake . . . and on other systems with badly supported motherboards, it is a real pain.

In most distros you can install LM-Sensors with the package management and they will be on the install CDs . . . if not get them here: http://www2.lm-sensors.nu/~lm78/ ( Do read there if your sensor chips and I2C are supported )

After installing the package, first do:
 
CODE
# modprobe i2c-dev

Then you have to configure it by running "sensors-detect" as root . . . here is an example, with additional notes of how "sensors-detect" ran on my system:

QUOTE (Text @ Screen)
$ su
Password:
[root@jupiter bruno]# sensors-detect

This program will help you determine which I2C/SMBus modules you need to
load to use lm_sensors most effectively. You need to have i2c and
lm_sensors installed before running this program.
Also, you need to be `root', or at least have access to the /dev/i2c/*
files, for most things.
If you have patched your kernel and have some drivers built in, you can
safely answer NO if asked to load some modules. In this case, things may
seem a bit confusing, but they will still work.

We can start with probing for (PCI) I2C or SMBus adapters.
You do not need any special privileges for this.
Do you want to probe now? (YES/no): YES <---------------------------------------- !!
Probing for PCI bus adapters...
Use driver `i2c-viapro' for device 00:11.0: VIA Technologies VT8233A/8235 South Bridge
Probe succesfully concluded.

We will now try to load each adapter module in turn.
Load `i2c-viapro' (say NO if built into your kernel)? (YES/no): NO <---------------------------------------- !!
Do you now want to be prompted for non-detectable adapters? (yes/NO): NO <---------------------------------------- !!
To continue, we need module `i2c-dev' to be loaded.
If it is built-in into your kernel, you can safely skip this.
i2c-dev is already loaded.

We are now going to do the adapter probings. Some adapters may hang halfway
through; we can't really help that. Also, some chips will be double detected;
we choose the one with the highest confidence value in that case.
If you found that the adapter hung after probing a certain address, you can
specify that address to remain unprobed. That often
includes address 0x69 (clock chip).

Some chips are also accessible through the ISA bus. ISA probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this.  Do you want to scan the ISA bus? (YES/no): YES <---------------------------------------- !!
Probing for `National Semiconductor LM78'
 Trying address 0x0290... Failed!
Probing for `National Semiconductor LM78-J'
 Trying address 0x0290... Failed!
Probing for `National Semiconductor LM79'
 Trying address 0x0290... Failed!
Probing for `Winbond W83781D'
 Trying address 0x0290... Failed!
Probing for `Winbond W83782D'
 Trying address 0x0290... Failed!
Probing for `Winbond W83627HF'
 Trying address 0x0290... Failed!
Probing for `Winbond W83697HF'
 Trying address 0x0290... Failed!
Probing for `Silicon Integrated Systems SIS5595'
 Trying general detect... Failed!
Probing for `VIA Technologies VT82C686 Integrated Sensors'
 Trying general detect... Failed!
Probing for `VIA Technologies VT8231 Integrated Sensors'
 Trying general detect... Failed!
Probing for `ITE IT8705F / IT8712F / SiS 950'
 Trying address 0x0290... Success!
   (confidence 8, driver `it87')
Probing for `IPMI BMC KCS'
 Trying address 0x0ca0... Failed!
Probing for `IPMI BMC SMIC'
 Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are
typically a bit more dangerous, as we have to write to I/O ports to do
this.  Do you want to scan for Super I/O sensors? (YES/no): YES <---------------------------------------- !!
Probing for `ITE 8712F Super IO Sensors'
 Failed! (0x8705)
Probing for `SMSC 47M10x Super IO Fan Sensors'
 Failed!
Probing for `SMSC 47M14x Super IO Fan Sensors'
 Failed!
Probing for `VT1211 Super IO Sensors'
 Failed!
Probing for `Winbond W83627HF Super IO Sensors'
 Failed!
Probing for `Winbond W83627THF Super IO Sensors'
 Failed!
Probing for `Winbond W83637HF Super IO Sensors'
 Failed!
Probing for `Winbond W83697HF Super IO Sensors'
 Failed!
Probing for `Winbond W83697UF Super IO PWM'
 Failed!

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `it87' (should be inserted):  <-------------Important info !!
 Detects correctly: <-------------Important info !!
 * ISA bus address 0x0290 (Busdriver `i2c-isa') <-------------Important info !!
   Chip `ITE IT8705F / IT8712F / SiS 950' (confidence: 8) <-------------Important info !!


I will now generate the commands needed to load the I2C modules.
Sometimes, a chip is available both through the ISA bus and an I2C bus.
ISA bus access is faster, but you need to load an additional driver module
for it. If you have the choice, do you want to use the ISA bus or the
I2C/SMBus (ISA/smbus)? ISA <---------------------------------------- !!

To make the sensors modules behave correctly, add these lines to
/etc/modules.conf: <----------------------------------------See below !!

NOTE: I made the important sections we need later BLUE

#----cut here----
# I2C module options
alias char-major-89 i2c-dev

#----cut here----

To load everything that is needed, add this to some /etc/rc* file: <-----------------------------------See below, in /etc/rc.d/rc.local !!

#----cut here----
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe it87
# sleep 2 # optional
/usr/local/bin/sensors -s # recommended

#----cut here----


WARNING! If you have some things built into your kernel, the list above
will contain too many modules. Skip the appropriate ones! You really should
try these commands right now to make sure everything is working properly.
Monitoring programs won't work until it's done.


Do you want to generate /etc/sysconfig/lm_sensors? (YES/no): YES  <---------------------------------------- !!
Copy prog/init/lm_sensors.init to /etc/rc.d/init.d/lm_sensors
for initialization at boot time.
[root@jupiter bruno]#


Next step is running the test of the modules ( see warning above in RED . . we take info from the BLUE section above:

QUOTE (Text @ Screen)
[root@jupiter bruno]# modprobe i2c-isa <------------------------------------Loading the module !!
[root@jupiter bruno]# modprobe it87 <---------------------------------Loading the module !!
[root@jupiter bruno]# sensors <---------------------------------------The test-run!!
it87-isa-0290
Adapter: ISA adapter
VCore 1:   +1.63 V  (min =  +1.53 V, max =  +1.87 V)
VCore 2:   +2.49 V  (min =  +2.25 V, max =  +2.75 V)
+3.3V:     +6.58 V  (min =  +2.96 V, max =  +3.60 V)   ALARM
+5V:       +4.94 V  (min =  +4.50 V, max =  +5.48 V)
+12V:     +12.08 V  (min = +11.36 V, max = +13.80 V)
-12V:     -19.31 V  (min = -15.86 V, max = -13.40 V)   ALARM
-5V:       +0.56 V  (min = -10.13 V, max =  -9.44 V)   ALARM
Stdby:     +4.91 V  (min =  +4.50 V, max =  +5.48 V)
VBat:      +3.21 V
fan1:     4821 RPM  (min = 3000 RPM, div = 2)
fan2:        0 RPM  (min = 3000 RPM, div = 2)          ALARM
fan3:        0 RPM  (min = 3000 RPM, div = 2)          ALARM
M/B Temp:    +31°C  (low  =   +20°C, high =   +60°C)   sensor = thermistor
CPU Temp:    +49°C  (low  =   +20°C, high =   +60°C)   sensor = thermistor
Temp3:       +18°C  (low  =   +20°C, high =   +60°C)   sensor = invalid

As you can see from the last command the sensors do work !! So now we can make the edits in the "modules.conf" and the "rc.local" files according to the BLUE sections in the output above:

CODE
[root@jupiter bruno]# vi /etc/modules.conf  <---------------------------------------The edits: add the part  in BLUE  !!
[root@jupiter bruno]# vi /etc/rc.d/rc.local  <---------------------------------------The edits: add the part   in BLUE  !!


After this you will have to reboot your system to see if the sensors load okay . . and then you can tweak Gkrellm to show the temperatures in the system-monitors on your desktop.



Bruno


PS: Next time we will show you how to set up the temps in Gkrellm


-- Aug 10 2004 ( Revised Dec 13 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email