From skulik@fnal.gov Tue Oct 28 17:40:15 2003 Date: Tue, 28 Oct 2003 16:15:54 -0600 From: Slava Kulik To: satish@fnal.gov, dbauer@fnal.gov Subject: CPU temperature Here are the instructions to build temperature monitoring modules You need to copy two tar files from broglie-clued0:/root lm_sensors-2.8.0 i2c-2.8.0 Then you need kernel source code installed. Then let's say you work with kernel 2.4.20-18.7 and you machine is dual cpu athlon. 1)Make sure that file /lib/modules/2.4.20-18.7smp/build/.config exists and is the same as /lib/modules/2.4.20-18.7smp/build/configs/kernel-2.4.20-athlon-smp.config . If not, just copy kernel-2.4.20-athlon-smp.config over to .config 2) Uninstall lm_sensors rpm and i2c rpms even if it breaks dependencies. 3) install i2c first and lm_sensors the second go to i2c directory and redefine MODPREF in Makefile as following MODPREF=/lib/modules/2.4.20-18.7smp also, replace /usr/local with /usr . You can take Makefile from broglie. 4) Then do make , make install ( there is a README file) 5) If you have a different kernel, then use different name in MODPREF. 6) goto lm_sensors, modify Makefile the same way as i2c ( or get it from broglie) 7) do make , make_install Then run lm_sensors-2.8.0/prog/detect/sensors-detect and answer the default way to all it's questions ( just press enter) It'll create /etc/sysconfig/lm_sensors file and also a script in /etc/rc.d/init.d/lm_sensors You can include /etc/rc.d/init.d/lm_sensors in the 5 run level to start automatically. 8) Your /etc/sysconfig/lm_sensors file will look like this : MODULE_0=i2c-isa MODULE_1="w83781d" MODULE_2=eeprom Comment out eeprom ( #MODULE_2=eeprom ) Each Motherboard has a chip installed that monitors the temperature. And there are two ways to connect this chips to the MB through ISA bus or SMbus . The sensors-detect will determine the right way, but the first line in this file means that on broglie we have chip w83781d connected with ISA bus. You might have a different chip , but if you have w83781d, you need to modify MODULE_1="w83781d" to MODULE_1="w83781d init=0" It means don't initialize the chip ( BIOS did it already). Otherwise the machine will hang. It's an empirical fact. Once you have all this, do /etc/rc.d/init.d/lm_sensors start and command sensors will print the temperature : Like this : temp1: +31°C (limit = +0°C, hysteresis = +23°C) sensor = thermistor temp2: +54.0°C (limit = +70°C, hysteresis = +65°C) sensor = 3904 transistor (beep) temp3: +60.0°C (limit = +70°C, hysteresis = +65°C) sensor = 3904 transistor (beep) It means that ambient (inside the case) temperature is 31, and once of the CPUs is 54 and the other is 60. Slava ///////////////////////////////////////////////////////////////////// From skulik@fnal.gov Wed Oct 29 12:47:44 2003 Date: Tue, 28 Oct 2003 21:40:56 -0600 From: Slava Kulik To: Daniela Bauer Cc: satish@fnal.gov Subject: Re: Installing a CPU temperature monitoring tool - for pedestrians, please ? YEs, you'd need /lib/modules/2.4.20-18.7smp/build/configs/kernel-2.4.20-i686-smp.config you type make in i2c directory. If you copied the whole directory from broglie, type make clean first. You need to uninstall RPMS that came with RH7.1 because they are old and might interfere. When I did rpm -qa | grep sensors on tigerente I got lm_sensors-devel-2.5.5-3 lm_sensors-2.5.5-3 So that's what you need to uninstall. ( rpm -e --nodeps ) Slava Daniela Bauer wrote: > > Hi Slava, Satish > > I copied these two directories: > > lm_sensors-2.8.0 > > i2c-2.8.0 > into /root on tigerente (I thought I try it out on my machine first, > before I wreck Kyle's). > > > Then let's say you work with kernel 2.4.20-18.7 and you machine is dual > > cpu athlon. > My kernel is > Linux tigerente-clued0 2.4.20-18.7smp #1 SMP Thu May 29 07:49:23 EDT 2003 > i686 unknown > and the machine is a dual processor Intel Xeon. > I haven't got a /lib/modules/2.4.20-18.7smp/build/.config file. > I assume, that instead of the athlon one I copy > /lib/modules/2.4.20-18.7smp/build/configs/kernel-2.4.20-i686-smp.config > instead ? > > > 1)Make sure that file /lib/modules/2.4.20-18.7smp/build/.config exists > > and is the same as > > /lib/modules/2.4.20-18.7smp/build/configs/kernel-2.4.20-athlon-smp.config > > . If not, just copy kernel-2.4.20-athlon-smp.config over to .config > > > 2) Uninstall lm_sensors rpm and i2c rpms even if it breaks dependencies. > I followed the instructions in i2c/QUICKSTART and typed 'lsmod' and I get: > Module Size Used by Tainted: P > soundcore 7044 0 (autoclean) > parport_pc 17764 1 (autoclean) > lp 8768 0 (autoclean) > parport 36288 1 (autoclean) [parport_pc lp] > nvidia 1671936 10 (autoclean) > nfs 79484 9 (autoclean) > nfsd 78016 8 (autoclean) > lockd 57600 1 (autoclean) [nfs nfsd] > sunrpc 83156 1 (autoclean) [nfs nfsd lockd] > autofs 12356 8 (autoclean) > e1000 58168 1 (autoclean) > ipt_LOG 4544 11 (autoclean) > ipt_limit 1888 15 (autoclean) > ipt_state 1344 1 (autoclean) > ip_conntrack 28852 1 (autoclean) [ipt_state] > iptable_filter 2560 1 (autoclean) > ip_tables 14720 4 [ipt_LOG ipt_limit ipt_state > iptable_filter] > ide-scsi 11232 0 > scsi_mod 110956 1 [ide-scsi] > ide-cd 32352 0 > cdrom 32576 0 [ide-cd] > ext3 69632 3 (autoclean) > jbd 51848 3 (autoclean) [ext3] > loop 11376 0 (autoclean) > lvm-mod 65376 7 (autoclean) > > So I don't need to uninstall anything, right ? > > > 3) install i2c first and lm_sensors the second > > go to i2c directory and redefine MODPREF in Makefile as following > > MODPREF=/lib/modules/2.4.20-18.7smp > > also, replace /usr/local with /usr . You can take Makefile from broglie. > > 4) Then do make , make install ( there is a README file) > Oh dear, stupid question ahead: Do I type 'make' in the i2c directory or > do I go one directory up and type 'make i2c' ? > > 5) If you have a different kernel, then use different name in MODPREF. > > 6) goto lm_sensors, modify Makefile the same way as i2c ( or get it from > > broglie) > > 7) do make , make_install > > Cheers, > Daniela From skulik@fnal.gov Fri Oct 31 08:34:26 2003 Date: Fri, 31 Oct 2003 00:26:33 -0600 From: Yaroslav Kulik To: Daniela Bauer Cc: Satish Desai Subject: Re: CPU temperatur -- still not in the fast lane O.K. The trick was to update /usr/include/version.h file. It's from old 2.4.17 kernel and the new modules thought they were build for it too. I copied /lib/modules/kernel-2.4.20-18.7smp/build/include/linux/version.h to /include/linux/version.h and rebuild lm_sensors and now it's working. Slava On Thu, 2003-10-30 at 18:57, Daniela Bauer wrote: > Hi Slava, > > it didn't quite work. > > I went trough all the steps and I got a file > /etc/sysconfig/lm_sensors > which looked like this: > MODULE_0=i2c-isa > MODULE_1=w83781d > MODULE_2=w83627hf > > which I changed to > MODULE_0=i2c-isa > MODULE_1="w83781d init=0" > MODULE_2=w83627hf > > but it didn't make a script /etc/rc.d/init.d/lm_sensors > > I tried to copy yours from broglie, but I get: > ./lm_sensors start > Starting up sensors: starting module __i2c-isa__ > starting module __w83781d init=0__ > Can't access /proc file > /proc/sys/dev/sensors/chips or /proc/bus/i2c unreadable; > Make sure you have done 'modprobe i2c-proc'! > [FAILED] > tigerente-clued0:/etc/rc.d/init.d# modprobe i2c-proc > tigerente-clued0:/etc/rc.d/init.d# ./lm_sensors start > Starting up sensors: starting module __i2c-isa__ > starting module __w83781d init=0__ > Can't access /proc file > /proc/sys/dev/sensors/chips or /proc/bus/i2c unreadable; > Make sure you have done 'modprobe i2c-proc'! > > > Any idea what is wrong ? > > When I did the make installs it claimed both times that it worked. > > Cheers, > Daniela > > > > > > Yes, MODPRED is correct. I just didn't look carefully. > > > > Slava > > > > Daniela Bauer wrote: > > > > > > Hi Slava, > > > > > > I am on point 6 now: > > > I did: > > > 3) install i2c first and lm_sensors the second > > > go to i2c directory and redefine MODPREF in Makefile as following > > > MODPREF=/lib/modules/2.4.20-18.7smp > > > also, replace /usr/local with /usr . You can take Makefile from > > > broglie. > > > 4) Then do make , make install ( there is a README file) > > > 5) If you have a different kernel, then use different name in MODPREF. > > > > > > and it claimed "installation successfull." > > > > > > 6) goto lm_sensors, modify Makefile the same way as i2c ( or get it > > > from broglie) > > > > > > I had a look in the Makefile from broglie and in lm_access you had changed > > > MODPRED (and not MODPREF as in i2c): > > > > > > lm_access/Makefile: > > > MODPREF := /lib/modules/$(shell $(CC) -I$(LINUX_HEADERS) -E etc/config.c | > > > grep uts_release |cut -f 2 -d'"') > > > MODPRED := /lib/modules/2.4.20-18.7smp > > > > > > i2c/Makefile: > > > MODPREF=/lib/modules/2.4.20-18.7smp > > > > > > As you obviously got it working, I assume the variable to change here > > > would be MODPRED, not MODPREF, right ? What do these variables mean ? (MOD > > > is module, but then ?) > > > > > > Cheers, > > > Daniela > > > > ------------------------------------------------------------------- > Daniela Bauer > Indiana University E-Mail: dbauer@fnal.gov > MS 352 PO Box 500 > Fermilab > Batavia, IL 60510 > FNAL Phone: +1-630-840-3859 > FNAL Fax: +1-630-840-8886 > http://www-d0.fnal.gov/~dbauer > ------------------------------------------------------------------- >