Sensors
25 April 2005

Summary

Monitoring utility installed in May 2002. After several new kernel builds, it stopped working, and it's not clear it's worth the effort to keep it working. The main thing was to monitor the CPU temperature, but I've now seen that it doesn't rise even if I transcode at 100% usage all night.

Software and guides

Commands

  • sensors
  • i2cdetect -l (lists installed busses only)
  • i2cdetect (probing can cause problems)
  • cat /proc/ioports (shows lots of stuff, not particularly sensors)
  • l /sys/bus/i2c/devices/

Installation history

2005-04-25 Sigillo, Chianti, and Clitunno

sensors-detect on Sigillo --

Use driver `i2c-ali15x3' for device 00:11.0: Acer Labs 1533/1543
Use driver `i2c-ali1535' for device 00:11.0: Acer Labs 1535

I'm pretty sure I have ali 1533 -- that's what lspci says (ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV]).  So I need the i2c-ali15x3. However, on boot I get this:

i2c /dev entries driver
ali15x3_smbus 0000:00:11.0: ALI15X3_smb region uninitialized - upgrade BIOS or use force_addr=0xaddr
ali15x3_smbus 0000:00:11.0: ALI15X3 not detected, module not inserted.
So that's a clear error message. I wonder if I can upgrade the BIOS.

On Chianti (looking very good -- though the voltages reported are ALARM-inducing):
# sensors
tda9887-i2c-4-43
Adapter: cx88[0]

Thomson DDT 7610 -i2c-4-61
Adapter: cx88[0]

Philips NTSC_M -i2c-3-61
Adapter: saa7133[0]

it8712-isa-0290
Adapter: ISA adapter
VCore 1:   +1.46 V  (min =  +1.42 V, max =  +1.57 V)   ALARM
VCore 2:   +2.64 V  (min =  +2.40 V, max =  +2.61 V)   ALARM
+3.3V:     +6.53 V  (min =  +3.14 V, max =  +3.46 V)   ALARM
+5V:       +3.71 V  (min =  +4.76 V, max =  +5.24 V)   ALARM

+12V:     +11.90 V  (min = +11.39 V, max = +12.61 V)
-12V:     -12.27 V  (min = -12.63 V, max = -11.41 V)   ALARM
-5V:       -4.84 V  (min =  -5.26 V, max =  -4.77 V)   ALARM
Stdby:     +4.25 V  (min =  +4.76 V, max =  +5.24 V)   ALARM
VBat:      +4.08 V
fan1:     3183 RPM  (min =    0 RPM, div = 8)
fan2:     1068 RPM  (min =  664 RPM, div = 8)
fan3:        0 RPM  (min =  664 RPM, div = 8)          ALARM
M/B Temp:    +25 C  (low  =   +15 C, high =   +40 C)   sensor = thermistor
CPU Temp:    +34 C  (low  =   +15 C, high =   +45 C)   sensor = thermistor
Temp3:        +2 C  (low  =   +15 C, high =   +45 C)   sensor = diode
"If you installed lm_sensors and want to see the right output from 'sensors', then edit /etc/sensors.conf and adjust it to your needs. If you have problems with gkrellm, you can do this by entering values into the 'Offset' and 'Factor' boxes in the 'Properties' window."

Cf. results on clitunno.

2002-05-01 Gubbio

I got lm-sensors from CVS (no need to use this). 

Browse the cvs at http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2

cvs -d :pserver:anon@cvs.lm-sensors.nu:/home/cvs login

Don't press return for password but give anonymous.

To check out the latest 2.x code:

cvs -d :pserver:anon@cvs.lm-sensors.nu:/home/cvs checkout lm_sensors2

*AND* also check out the i2c dist:

cvs -d :pserver:anon@cvs.lm-sensors.nu:/home/cvs checkout i2c

To update the code, do a "cvs update -d" from within the lm_sensors or lm_sensors2 directory. Please read the README and INSTALL files for how to build the code. Also read the related files in the 'doc' directory for info regarding the different bus and chip drivers. Lastly, you can use the regular cvs commands on the files (like 'cvs log [filename]') to see the comments made by the developers as patches were made.

I got both i2c and lm_sensors2. I then entered i2c and read the README and INSTALL files.

I decided to use method 1:

Separate from kernel compilation (compilation option 1)
=======================================================

This will compile and install the complete i2c package. Though nothing is written to your kernel tree, a proper tree is still needed for this. See earlier for what a proper kernel tree is.

Compilation is done by `make all'; `make install' installs the package.

You will get a lot of warnings about files which are not found, all ending on `.d'. You can safely ignore this; they contain dependency information, which is regenerated on the spot.

I then did make install. The program looks like it got put into /lib/modules/.
I did make clean.

Next, I moved to the cvs of lm-sensors. The README says,

If had compiled all i2c and lm_sensors drivers as modules, you are in luck. You can simply compile the newest versions of i2c and lm_sensors and install them. Just make sure the right modules areloaded (best bet: remove the old ones first).

This went fine, and so did make install. See /etc/sensors.conf. It looks like we have an executable in /usr/local/bin and man pages in /usr/local/man/. The main parts are in /usr/local/lib/ -- lots of library files. It all looks painless.


Using the sensors package
=========================

You can now load the modules by using `modprobe'. For example, `modprobe i2c-piix4' will load the i2c-piix4 module, and all i2c moduleson which it depends.

You can not use demand-loading; you will have to issue explicit modprobe instructions.

There is a special scanning program installed called sensors-detect. It will scan all available I2C and SMBus adapters for all known devices, and give you a list of what modules you need to insert. It is written inPerl, and you will need at least Perl 5.004 to run it succesfully.

You can use the installed sensors program to get a report of all detected sensor devices. There is also a manual page for this program. Calling `sensors -s' will set the limits and other configuration settings specified in /etc/sensors.conf. Again, read the manual pages for moreinformation.

There are many auxiliary programs not installed. You can find them under the prog subdirectory. A list can be found in doc/progs.

I then ran sensors-detect and got this:

You need to have done a `make install', issued a `depmod -a' and made sure `/etc/conf.modules' (or `/etc/modules.conf') contains the appropriate module path before you can use some functions of this utility. Read doc/modules for more information.

I issued depmod -a and got nothing. I ran sensors-detect again:

Probing for PCI bus adapters...
Use driver `i2c-piix4' for device 00:07.3: Intel 82371AB PIIX4 ACPI
Use driver `i2c-voodoo3' for device 01:00.0: 3Dfx Voodoo Banshee
Probe succesfully concluded.

Load `i2c-voodoo3' (say NO if built into your kernel)? (YES/no): y
Module loaded succesfully.

Probing for `National Semiconductor LM79'
Trying address 0x0290... Success!
(confidence 7, driver `lm78')

Driver `lm78' (should be inserted):
Detects correctly:
* ISA bus address 0x0290 (Busdriver `i2c-isa')
Chip `National Semiconductor LM79' (confidence: 7)

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

WARNING! If you have some things built into your kernel, the
below list will contain too many modules. Skip the appropriate ones!
To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe lm78
#----cut here----

To make the sensors modules behave correctly, add these lines to either
/etc/modules.conf or /etc/conf.modules:

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

Further Installation.

For help, see http://www2.lm-sensors.nu/~lm78/support.html

Documents: http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc

FAQ: http://www2.lm-sensors.nu/~lm78/FAQ.txt

I typed sensors -s (I also added this to rc.config) and got a sort of response as
if
something was happening.

I then opened GKrellM and the sensors were all there -- temperature and voltage. I'm not getting anything from the fans, and I can't see CPU speed.

gubbio:/etc/init.d # lsmod

Module Size Used by
lm78 7184 0
i2c-proc 6608 0 [lm78]
i2c-isa 1264 0 (unused)
i2c-dev 4288 0 (unused)
i2c-voodoo3 2672 0 (unused)
i2c-algo-bit 8032 2 [i2c-voodoo3]
i2c-piix4 3936 0 (unused)
i2c-core 14512 0 [lm78 i2c-proc i2c-isa i2c-dev i2c-algo-bit
i2c-piix4]

What to do if a module won't insert?

Did you use 'modprobe' instead of 'insmod'??? Don't use insmod. Were there unresolved symbols? Did you run 'depmod -a'? Run 'depmod -a -e' to see where the symbol problem is.

Error: No i2c-bus specified!
Syntax: i2cdetect I2CBUS
I2CBUS is an integer
Installed I2C busses:
i2c-0 smbus SMBus PIIX4 adapter at 5000 Non-I2C SMBus adapter

i2c-1 i2c I2C Voodoo3/Banshee adapter Bit-shift algorithm

i2c-2 i2c DDC Voodoo3/Banshee adapter Bit-shift algorithm

i2c-3 dummy ISA main adapter ISA bus algorithm

So I ran i2cdetect 0 and got Error: Could not open file `/dev/i2c-0',
`/dev/i2c0', or
`/dev/i2c/0': No such file or directory -- could this be why my CPU is not being
seen?

In fact, I find no /dev/i2c at all, which is likely a problem. Here's what locate
sees:

/usr/X11R6/lib/modules/libi2c.a
/usr/local/include/linux/i2c-algo-bit.h
/usr/local/include/linux/i2c-algo-pcf.h
/usr/local/include/linux/i2c-dev.h
/usr/local/include/linux/i2c-elektor.h
/usr/local/include/linux/i2c-id.h
/usr/local/include/linux/i2c-pcf8584.h
/usr/local/include/linux/i2c-proc.h
/usr/local/include/linux/i2c.h

Home page
http://secure.netroedge.com/~lm78/

Mailing list
http://archives.andrew.net.au/lm-sensors/

I wrote,

Date: Mon, 27 May 2002 21:44:54 -0700 (PDT)
From: steen@cogweb.net
To: sensors@stimpy.netroedge.com
Subject: /dev/i2c missing

Hi guys,

I just got the cvs of i2c and lm-sensors and it compiled and installed fine. When I do i2cdetect x, I get

Installed I2C busses:
i2c-0 smbus SMBus PIIX4 adapter at 5000 Non-I2C SMBus adapter
i2c-1 i2c I2C Voodoo3/Banshee adapter Bit-shift algorithm
i2c-2 i2c DDC Voodoo3/Banshee adapter Bit-shift algorithm
i2c-3 dummy ISA main adapter ISA bus algorithm

Then I get get Error: Could not open file `/dev/i2c-0', `/dev/i2c0', or `/dev/i2c/0': No such file -- and so on for 0-3. In fact, there are no /dev/i2c entries. Why don't I have /dev/i2c? What else could I be sensing?

I would like to get CPU speed -- can I?

On the other hand, I now get the temperature of my CPU and the voltages fine, in KgrellM.

Great work!

Cheers,
David

Date: Tue, 28 May 2002 08:44:13 -0400
From: Mark Studebaker <mds@paradyne.com>
To: steen@cogweb.net
Cc: sensors@stimpy.netroedge.com
Subject: Re: /dev/i2c missing

see prog/mkdev/mkdev.sh

More on LM_sensors
4 Jun 2002

* sensors-detect

This is where modules are:

/lib/modules/2.4.16/kernel/drivers

To start them up, do this:

* sensors -s
* modprobe i2c-proc

gubbio #: lsmod
i2c-voodoo3 2672 0 (unused)
i2c-algo-bit 8000 2 [i2c-voodoo3]
i2c-dev 3712 0 (unused)
i2c-proc 6032 0
i2c-piix4 3936 0 (unused)
i2c-core 13968 0 [i2c-algo-bit i2c-dev i2c-proc i2c-piix4]

Here's what sensors-detect finds:

Probing for PCI bus adapters.
Use driver `i2c-piix4' for device 00:07.3: Intel 82371AB PIIX4 ACPI
Use driver `i2c-voodoo3' for device 01:00.0: 3Dfx Voodoo Banshee
Probe succesfully concluded.

Probing for `National Semiconductor LM79'
Trying address 0x0290... Success!
(confidence 7, driver `lm78')

Driver `lm78' (should be inserted):
Detects correctly:
* ISA bus address 0x0290 (Busdriver `i2c-isa')
Chip `National Semiconductor LM79' (confidence: 7)

add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe lm78
#----cut here----

I've done that already of course, but somehow the installation got screwed up -- perhaps because of a "make modules_install" that overwrote them?

I did another make install from the /giant/cvs. Note that you have to have a current kernel tree for this to work!

>From man insmod:

insmod -k

-k --autoclean

Set the auto-clean flag on the module. This flag will be used by kerneld(8)
to remove modules that have not been used in some period of time -- usually one minute.

-p --probe
Probe the module to see if it could be successfully loaded.

rmmod - unload loadable modules
lsmod - list loaded modules

.There's some problem somewhere, but it's not clear it's worth fixing.

 

 

top
Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb