GKrellM and lm_sensors
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.
Web site
-- system monitors
LM_Sensors
The home page is at http://www2.lm-sensors.nu/~lm78
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.
I then did,
make all
I got these errors:
Makefile:175: kernel/i2c-core.d: No such file or directory
Makefile:175: kernel/i2c-dev.d: No such file or directory
Makefile:175: kernel/i2c-algo-bit.d: No such file or directory
Makefile:175: kernel/i2c-elv.d: No such file or directory
Makefile:175: kernel/i2c-velleman.d: No such file or directory
Makefile:175: kernel/i2c-algo-pcf.d: No such file or directory
Makefile:175: kernel/i2c-elektor.d: No such file or directory
Makefile:175: kernel/i2c-proc.d: No such file or directory
Makefile:175: kernel/i2c-pport.d: No such file or directory
Makefile:175: kernel/i2c-pcf-epp.d: No such file or directory
Apparently this is not serious:
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 are
loaded (best bet: remove the old ones first).
Errors -- as predicted:
gubbio:/home/steen/mnt/giant/cvs/lm_sensors2 # make all
Makefile:221: kernel/busses/i2c-savage4.d: No such file or directory
Makefile:221: kernel/busses/i2c-ali1535.d: No such file or directory
Makefile:221: kernel/busses/i2c-ali15x3.d: No such file or directory
Makefile:221: kernel/busses/i2c-amd756.d: No such file or directory
Makefile:221: kernel/busses/i2c-hydra.d: No such file or directory
Makefile:221: kernel/busses/i2c-i801.d: No such file or directory
Makefile:221: kernel/busses/i2c-i810.d: No such file or directory
Makefile:221: kernel/busses/i2c-isa.d: No such file or directory
Makefile:221: kernel/busses/i2c-sis5595.d: No such file or directory
Makefile:221: kernel/busses/i2c-piix4.d: No such file or directory
Makefile:221: kernel/busses/i2c-via.d: No such file or directory
Makefile:221: kernel/busses/i2c-viapro.d: No such file or directory
Makefile:221: kernel/busses/i2c-voodoo3.d: No such file or directory
Makefile:221: kernel/chips/pcf8591.d: No such file or directory
Makefile:221: kernel/chips/adm1021.d: No such file or directory
Makefile:221: kernel/chips/adm1024.d: No such file or directory
Makefile:221: kernel/chips/adm1025.d: No such file or directory
Makefile:221: kernel/chips/adm9240.d: No such file or directory
Makefile:221: kernel/chips/bt869.d: No such file or directory
Makefile:221: kernel/chips/ddcmon.d: No such file or directory
Makefile:221: kernel/chips/ds1621.d: No such file or directory
Makefile:221: kernel/chips/eeprom.d: No such file or directory
Makefile:221: kernel/chips/fscpos.d: No such file or directory
Makefile:221: kernel/chips/fscscy.d: No such file or directory
Makefile:221: kernel/chips/gl518sm.d: No such file or directory
Makefile:221: kernel/chips/gl520sm.d: No such file or directory
Makefile:221: kernel/chips/it87.d: No such file or directory
Makefile:221: kernel/chips/lm75.d: No such file or directory
Makefile:221: kernel/chips/lm78.d: No such file or directory
Makefile:221: kernel/chips/lm80.d: No such file or directory
Makefile:221: kernel/chips/lm87.d: No such file or directory
Makefile:221: kernel/chips/ltc1710.d: No such file or directory
Makefile:221: kernel/chips/matorb.d: No such file or directory
Makefile:221: kernel/chips/maxilife.d: No such file or directory
Makefile:221: kernel/chips/mtp008.d: No such file or directory
Makefile:221: kernel/chips/pcf8574.d: No such file or directory
Makefile:221: kernel/chips/sis5595.d: No such file or directory
Makefile:221: kernel/chips/thmc50.d: No such file or directory
Makefile:221: kernel/chips/w83781d.d: No such file or directory
Makefile:221: kernel/chips/via686a.d: No such file or directory
Makefile:221: lib/data.ld: No such file or directory
Makefile:221: lib/general.ld: No such file or directory
Makefile:221: lib/error.ld: No such file or directory
Makefile:221: lib/chips.ld: No such file or directory
Makefile:221: lib/proc.ld: No such file or directory
Makefile:221: lib/access.ld: No such file or directory
Makefile:221: lib/init.ld: No such file or directory
Makefile:221: lib/data.ad: No such file or directory
Makefile:221: lib/general.ad: No such file or directory
Makefile:221: lib/error.ad: No such file or directory
Makefile:221: lib/chips.ad: No such file or directory
Makefile:221: lib/proc.ad: No such file or directory
Makefile:221: lib/access.ad: No such file or directory
Makefile:221: lib/init.ad: No such file or directory
Makefile:221: prog/sensors/main.rd: No such file or directory
Makefile:221: prog/sensors/chips.rd: No such file or directory
Makefile:221: prog/dump/isadump.rd: No such file or directory
Makefile:221: prog/dump/i2cdump.rd: No such file or directory
Makefile:221: prog/dump/i2cset.rd: No such file or directory
Makefile:221: prog/detect/i2cdetect.rd: No such file or directory
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 modules
on 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
in
Perl, 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 more
information.
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.
Do you now want to be prompted for non-detectable adapters? (yes/NO):
y
Load `i2c-elektor' (say NO if built into your kernel)? (YES/no): n
Load `i2c-elv' (say NO if built into your kernel)? (YES/no): n
Load `i2c-philips-par' (say NO if built into your kernel)? (YES/no): n
Load `i2c-velleman' (say NO if built into your kernel)? (YES/no): n
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 not loaded. Do you want to load it now? (YES/no): y
Module loaded succesfully.
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. If you have a PIIX4, that often
includes addresses 0x69 and/or 0x6a.
Next adapter: SMBus PIIX4 adapter at 5000 (Non-I2C SMBus adapter)
Do you want to scan it? (YES/no/selectively): y
Can't open /dev/i2c[-/]0
Next adapter: I2C Voodoo3/Banshee adapter (Bit-shift algorithm)
Do you want to scan it? (YES/no/selectively): y
Can't open /dev/i2c[-/]1
Next adapter: DDC Voodoo3/Banshee adapter (Bit-shift algorithm)
Do you want to scan it? (YES/no/selectively): y
Can't open /dev/i2c[-/]2
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): y
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.
|