Typo
[linux_from_scratch_hints.git] / OLD / lm_sensors.txt
blob9391c28edb7c1bf6e609c0904fb1e3c50ab24c32
1 TITLE:          lm_sensors
2 LFS VERSION:    3.0
3 AUTHOR:         Adam Ottley (aottley@shaw.ca)
5 SYNOPSIS:
6         lm_sensors is a set of drivers for hardware monitoring devices such as
7 the lm7x series.  It depends upon the i2c set of kernel drivers for accessing
8 the devices.
10 HINT:
12         From the lm_sensors homepage at http://www.netroedge.com/~lm78/,
13 download the lm_sensors-2.6.2.tar.gz package.  If you have kernel 2.4.12 or
14 earlier, you also need the i2c-2.6.2.tar.gz package.  Kernel versions 2.4.13
15 and later have version 2.6.1 of the i2c package, but you should check the i2c
16 changelog to see if any bugs were fixed that affect your hardware.
18 If you have an IBM ThinkPad, don't even think about installing lm_sensors.
19 It will ruin your laptop and force you to send it to the factory for fixing.
21 -------------------------
24 Configuring the kernel
26 The lm_sensors package requires a configured kernel tree.  Configure the
27 kernel with your options of preference, then run "make dep" to finish
28 generating the files that lm_sensors needs.
30 If you're using the kernel's built-in i2c support, set the following options
31 under the Character Devices/I2C Support to either Y or M before building:
33 - I2C support
34 - I2C bit banging interfaces
35 - I2C device interface
36 - I2C /proc interface
39 -------------------------
42 Installing the i2c package
44 Take a look at the top-level Makefile in the i2c-2.6.2 directory.  Point the
45 LINUX variable to your Linux source tree and the LINUX_INCLUDE_DIR variable to
46 where you want the i2c headers installed (default /usr/local/include/linux).
47 To build and install the i2c modules into the /lib/modules/<kernelversion>/misc
48 directory, just run:
50   make &&
51   make install
54 -------------------------
57 Installing the lm_sensors package
59 Again, look at the top-level makefile and point the LINUX variable to your
60 kernel source tree, point I2C_HEADERS to where you installed the i2c headers
61 (point it to your kernel tree if you used the kernel's built-in i2c), change
62 PREFIX to where you want the programs and libraries installed, and adjust any
63 other variables to suit your machine.  Once that's done, run:
65   make &&
66   make install
68 to install the modules, programs and libs.
71 -------------------------
74 Configuration
76 First, you should create the i2c-* device files with the MAKEDEV script in
77 /dev:
79   cd /dev
80   ./MAKEDEV i2c
82 In the prog/detect directory in the lm_sensors source tree there is a perl
83 script called sensors-detect that will ask a few questions, detect what i2c
84 module you need, and probe the i2c bus on your chipset for devices.  After
85 the probe, it'll give you a list of commands to place in your rc.local so
86 that the proper modules are loaded upon startup, as well as the lines you
87 need to put in /etc/modules.conf.
89 The lm_sensors installation puts a sample sensors.conf file in the /etc
90 directory.  Look around in that file and make any changes you want.  It's
91 very verbosely commented.
93 To test the package, load the modules the sensors-detect script told you,
94 then run "sensors".  A sample output would be:
96 lm79-i2c-0-2d
97 Adapter: SMBus PIIX4 adapter at 5000
98 Algorithm: Non-I2C SMBus adapter
99 VCore 1:   +2.03 V  (min =  +1.90 V, max =  +2.09 V)
100 +3.3V:     +3.32 V  (min =  +3.13 V, max =  +3.45 V)
101 +5V:       +5.02 V  (min =  +4.72 V, max =  +5.24 V)
102 +12V:     +11.67 V  (min = +11.36 V, max = +12.58 V)
103 -12V:     -11.89 V  (min = -11.33 V, max = -12.55 V)
104 -5V:       -5.07 V  (min =  -4.74 V, max =  -5.24 V)
105 fan1:     2518 RPM  (min = 1500 RPM, div = 4)
106 fan3:     4218 RPM  (min = 3000 RPM, div = 2)
107 temp:      +37.0°C  (limit =  +60°C, hysteresis =  +50°C)
108 vid:      +2.00 V
109 alarms:   Board temperature input (usually LM75 chips)
110 alarms:   Chassis intrusion detection
113 You might see a few ALARMs in your first check, but don't panic.  They could
114 very well be unconnected inputs or bad fan divisors.  Check the lm_sensors
115 FAQ before you start worrying.
116 (http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/FAQ)
119 -------------------------
122 With the base system in place, you can now get other programs (i.e. gkrellm,
123 ksysguard) to use lm_sensors for system monitoring.