lm_sensors - to get CPU temperature

General support questions including new installations
kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

lm_sensors - to get CPU temperature

Post by kilko » 2010/10/24 18:33:01

Trying to find the CPU temperature, I found this lm_sensors is what I need..

I do this;
wget http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.2.0.tar.bz2
bzip2 -dv lm_sensors-3.2.0.tar.bz2
tar xvf lm_sensors-3.2.0.tar

# make all
Makefile:175: lib/data.ld: No such file or directory
Makefile:175: lib/general.ld: No such file or directory
Makefile:175: lib/error.ld: No such file or directory
Makefile:175: lib/access.ld: No such file or directory
Makefile:175: lib/init.ld: No such file or directory
Makefile:175: lib/sysfs.ld: No such file or directory
Makefile:175: lib/conf-parse.ld: No such file or directory
Makefile:175: lib/conf-lex.ld: No such file or directory
Makefile:175: lib/data.ad: No such file or directory
Makefile:175: lib/general.ad: No such file or directory
Makefile:175: lib/error.ad: No such file or directory
Makefile:175: lib/access.ad: No such file or directory
Makefile:175: lib/init.ad: No such file or directory
Makefile:175: lib/sysfs.ad: No such file or directory
Makefile:175: lib/conf-parse.ad: No such file or directory
Makefile:175: lib/conf-lex.ad: No such file or directory
bison -p sensors_yy -d lib/conf-parse.y -o lib/conf-parse.c
make: bison: Command not found
make: *** [lib/conf-parse.c] Error 127
#

----

What am I missing ?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: lm_sensors - to get CPU temperature

Post by pschaff » 2010/10/24 19:44:40

You are apparently missing the recommended reading for new users:
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14274&forum=47]Readme First[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14273&forum=47]Where to Find Answers[/url]
[url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url]

Please also read about [url=http://wiki.centos.org/PackageManagement/SourceInstalls]Source Installs[/url], and [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url], and note the warnings and advice about installing and configuring the [url=http://wiki.centos.org/PackageManagement/Yum/Priorities]yum priorities plugin[/url].

Then install the lm_sensors [i][b]package[/b][/i] from the base CentOS repos, or an updated one from a reliable source such as the [url=http://elrepo.org/]ELRepo repository[/url].

kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

Re: lm_sensors - to get CPU temperature

Post by kilko » 2010/10/27 18:57:57

Posted getinfo.sh here: http://pastebin.centos.org/35510

--

[root@centos55 lm_sensors]# uname -a
Linux centos55 2.6.18-194.17.4.el5 #1 SMP Mon Oct 25 15:50:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

#yum install lm_sensors


Try to run "sensors":

[root@centos55 lm_sensors]# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.


Try to run "sensors-detect":
...no such command!

... so I download the script from here;
wget http://dl.lm-sensors.org/lm-sensors/files/sensors-detect
chmod 755 sensors-detect


Then run "sensors-detect", and it gives me:
...
...
...
Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `to-be-written':
* ISA bus, address 0x290
Chip `Nuvoton W83667HG-B Super IO Sensors' (confidence: 9)

Driver `coretemp':
* Chip `Intel Core family thermal sensor' (confidence: 9)


Note: there is no driver for Nuvoton W83667HG-B Super IO Sensors yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no):
Starting lm_sensors: No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
[FAILED]
Unloading i2c-dev... OK

[root@centos55 lm_sensors]#



Tried also reading this but without help..
http://www.question-defense.com/2010/03/24/lm_sensors-on-cent-os-5-4-how-to-get-and-install-the-coretemp-module

kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

Re: lm_sensors - to get CPU temperature

Post by kilko » 2010/10/27 19:22:40

I also tried enabling the "elrepo" repository.

(I did this by editing the /etc/yum.repos.d/elrepo.repo , and setting "enabled=1)

#yum update lm_sensors

Updating: lm_sensors - x86_64 - 2.10.8-2.el5.elrepo - elrepo - 525 k



...but still I do get the same error:
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

User avatar
toracat
Forum Moderator
Posts: 7416
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

lm_sensors - to get CPU temperature

Post by toracat » 2010/10/27 19:43:58

[quote]
kilko wrote:

Try to run "sensors-detect":
...no such command!
[/quote]
The sensors-detect command is included in the lm_sensors package. The reason it was not found is because you did not "fully" become root. Please read through the CentOS wiki [url=http://wiki.centos.org/TipsAndTricks/BecomingRoot]Becoming Root[/url]. You will see the difference between 'su' and 'su -' and find that you need to do the latter.

kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

Re: lm_sensors - to get CPU temperature

Post by kilko » 2010/10/27 20:28:57

Thank you for that link. Good reading! From now on I will use "su -" :)
Also I noticed the sudo commands.. interessting! Will implement this too now!
Thanx!

kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

Re: lm_sensors - to get CPU temperature

Post by kilko » 2010/10/28 18:39:50

I'm still not able to get the lm_sensors to work. Is this because of the motherboard is to new ?

#sensors

No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.

...or is the any other application that could be use to measure temperature ?

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: lm_sensors - to get CPU temperature

Post by AlanBartlett » 2010/10/28 23:46:41

[quote]
Driver `coretemp':
* Chip `Intel Core family thermal sensor' (confidence: 9)
[/quote]
Have you installed the [url=http://elrepo.org/tiki/kmod-coretemp]kmod-coretemp[/url] package from the [url=http://elrepo.org]ELRepo Project[/url]?

Note that you will also need the updated [url=http://elrepo.org/tiki/lm_sensors]lm_sensors[/url] package, also available from the [i]ELRepo[/i] repository.

kilko
Posts: 34
Joined: 2009/06/03 08:25:28
Location: Norway

Re: lm_sensors - to get CPU temperature

Post by kilko » 2010/10/30 00:35:35

[stighenning@centos55 ISO]$ yum search kmod-coretemp
Loaded plugins: fastestmirror
============= Matched: kmod-coretemp ================
kmod-coretemp.x86_64 : coretemp kernel module(s)
kmod-coretemp-xen.x86_64 : coretemp kernel module(s)
[stighenning@centos55 ISO]$


[root@centos55 ISO]# yum install kmod-coretemp.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.uninett.no
* base: ftp.uninett.no
* extras: ftp.uninett.no
* updates: ftp.uninett.no
Setting up Install Process
Package kmod-coretemp-1.1-8.el5.elrepo.x86_64 already installed and latest version
Nothing to do
[root@centos55 ISO]#


----

[root@centos55 ISO]# yum search lm_sensors
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.uninett.no
* base: ftp.uninett.no
* extras: ftp.uninett.no
* updates: ftp.uninett.no
====================== Matched: lm_sensors ==========================
lm_sensors.i386 : Hardware monitoring tools.
lm_sensors.x86_64 : Hardware monitoring tools.
lm_sensors-devel.i386 : Development files for programs which will use lm_sensors.
lm_sensors-devel.x86_64 : Development files for programs which will use lm_sensors.

[root@centos55 ISO]# yum install lm_sensors.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.uninett.no
* base: ftp.uninett.no
* extras: ftp.uninett.no
* updates: ftp.uninett.no
Setting up Install Process
Package lm_sensors-2.10.8-2.el5.elrepo.x86_64 already installed and latest version
Nothing to do
[root@centos55 ISO]#


Aha!!

Then I installed the;

# yum install lm_sensors-devel.x86_64

# sensors-detect

# sensors


And finally I got a result (does this look correct ?);

[root@centos55 ISO]# sensors -A
coretemp-isa-0000
Core 0: +21?C (high = +99?C)

coretemp-isa-0001
Core 1: +16?C (high = +99?C)

coretemp-isa-0002
Core 2: +19?C (high = +99?C)

coretemp-isa-0003
Core 3: +15?C (high = +99?C)

[root@centos55 ISO]#

User avatar
AlanBartlett
Forum Moderator
Posts: 9324
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: lm_sensors - to get CPU temperature

Post by AlanBartlett » 2010/10/30 00:57:39

[quote]
And finally I got a result (does this look correct ?);
[/quote]
Looks reasonable to me. ;-)

Post Reply

Return to “CentOS 5 - General Support”