Re: CPU temp/fan tachometer for linux?
On 2 Oct, Peter S Galbraith wrote:
>
> stephen.p.ryan@dartmouth.edu wrote:
>
>> Try lm_sensors.
>>
>> http://appindex.freshmeat.net/view/904554804/
>
> Cool. Have you compiled this?
> (Which do you pick? lm78-1.2.3.tgz or lm_sensors-1.4.6.tar.gz)
>
> I get:
>
> # insmod ./lm_sensors.o
> ./lm_sensors.o: kernel-module version mismatch
> ./lm_sensors.o was compiled for kernel version 2.0.33
> while this kernel is version 2.0.35.
>
> It must be getting the wrong kernel version 2.0.33 from
> /usr/include/linux/version.h
>
> $ grep linux/version *.c
> lmsysctl.c:#include <linux/version.h>
> smbus.c:#include <linux/version.h>
>
> $ dpkg -S /usr/include/linux/version.h
> libc6-dev: /usr/include/linux/version.h
>
> If I force it:
>
> # insmod -f ./lm_sensors.o
> Warning: kernel-module version mismatch
> ./lm_sensors.o was compiled for kernel version 2.0.33
> while this kernel is version 2.0.35
>
> ./lm_sensors.o: init_module: Device or resource busy
>
> So no luck so far. (This is why I love .debs !)
Jeff, I hope this answers your question as well.
Let's see, I have a lm_sensors-1.4.2.tgz. I have compiled it, and I
have also gotten the same error; I have also fixed this.
In the Makefile, change the line
CFLAGS = -D__KERNEL__ -DMODULE -I. -O2 -fomit-frame-pointer
to read
CFLAGS = -D__KERNEL__ -DMODULE -I/usr/src/kernel-source-2.0.34/include -I. -O2 -fomit-frame-pointer
instead. (the above should be all one line; it'll probably wrap or
something in between here & there.) Change the kernel-source-2.0.34 to
reflect whatever kernel you really are running.
After all this, I've found that my board is one of the few P6-based
boards that *doesn't* have these sensors on board. :-( I'd love to be
proven wrong, but the lm_sensors module claims there isn't any such
thing present in my system (Tyan Titan Pro S1662D, FWIW).
--
Stephen Ryan Debian GNU/Linux
Mathematics graduate student, Dartmouth College
Reply to: