How to Get CPU Temperature Information on Linux (CentOS 6.4 /RHEL)

Posted: May 21, 2013 in FX Pipeline, Linux

cpu04 cpu03 cpu02 cpu_01

How to Get CPU Temperature Information on Linux (CentOS 6.4 /RHEL)

lm_sensor is a tool that can monitor linux hardware

for installation :-
yum install lm_sensors

for Configuration :-
sensors-detect
(YES to all prompt)

to get the temperature information:-
sensors
and the output will be :-
[rajiv@elitebook ~]$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +34.0°C (crit = +128.0°C)
temp2: +45.0°C (crit = +128.0°C)
temp3: +34.0°C (crit = +128.0°C)
temp4: +34.0°C (crit = +128.0°C)
temp5: +34.0°C (crit = +128.0°C)
temp6: +0.0°C (crit = +128.0°C)
temp7: +0.0°C (crit = +128.0°C)
temp8: +0.0°C (crit = +128.0°C)
temp9: +0.0°C (crit = +128.0°C)
temp10: +0.0°C (crit = +128.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +40.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +40.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +35.0°C (high = +86.0°C, crit = +100.

 

 

 
This is the same procedure:-

[rajiv@elitebook ~]$ su
Password:
[root@elitebook rajiv]# yum install lm_sensors
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink | 3.8 kB 00:00
* base: centos.aol.in
* elrepo: ftp.osuosl.org
* epel: ftp.jaist.ac.jp
* extras: centos.aol.in
* remi: rpms.famillecollet.com
* rpmforge: http://www.mirrorservice.org
* updates: centos.aol.in
base | 3.7 kB 00:00
elrepo | 2.9 kB 00:00
extras | 3.5 kB 00:00
google-chrome | 951 B 00:00
linuxtech-release | 2.6 kB 00:00
remi | 2.9 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package lm_sensors.x86_64 0:3.1.1-17.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================
Package Arch Version Repository
Size
================================================================
Installing:
lm_sensors x86_64 3.1.1-17.el6 base 123 k

Transaction Summary
================================================================
Install 1 Package(s)

Total download size: 123 k
Installed size: 350 k
Is this ok [y/N]: y
Downloading Packages:
lm_sensors-3.1.1-17.el6.x86_64.rpm | 123 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : lm_sensors-3.1.1-17.el6.x86_64 1/1
Verifying : lm_sensors-3.1.1-17.el6.x86_64 1/1

Installed:
lm_sensors.x86_64 0:3.1.1-17.el6

Complete!
[root@elitebook rajiv]# sensors-detect
# sensors-detect revision 1.1
# System: Hewlett-Packard HP EliteBook 8760w (laptop)
# Board: Hewlett-Packard 1630

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you’re doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.

Silicon Integrated Systems SIS5595… No
VIA VT82C686 Integrated Sensors… No
VIA VT8231 Integrated Sensors… No
AMD K8 thermal sensors… No
AMD Family 11h thermal sensors… No
Intel digital thermal sensor… Success!
(driver `coretemp’)
Intel AMB FB-DIMM thermal sensor… No
VIA C7 thermal and voltage sensors… No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): YES
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor’… No
Trying family `SMSC’… Yes
Found unknown chip with ID 0x0701
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor’… No
Trying family `SMSC’… Yes
Found unknown non-standard chip with ID 0x7a

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): YES
Probing for `National Semiconductor LM78′ at 0x290… No
Probing for `National Semiconductor LM79′ at 0x290… No
Probing for `Winbond W83781D’ at 0x290… No
Probing for `Winbond W83782D’ at 0x290… No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): YES
Sorry, no supported PCI bus adapters found.
Module i2c-dev loaded successfully.

Next adapter: NVIDIA i2c adapter 0 at 1:00.0 (i2c-0)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 1 at 1:00.0 (i2c-1)
Do you want to scan it? (YES/no/selectively): YES
Client found at address 0x28
Probing for `National Semiconductor LM78’… No
Probing for `National Semiconductor LM79’… No
Probing for `National Semiconductor LM80’… No
Probing for `Winbond W83781D’… No
Probing for `Winbond W83782D’… No
Probing for `Winbond W83627HF’… No
Probing for `Winbond W83627EHF’… No
Probing for `Winbond W83627DHG/W83667HG/W83677HG’… No
Probing for `Asus AS99127F (rev.1)’… No
Probing for `Asus AS99127F (rev.2)’… No
Probing for `Asus ASB100 Bach’… No
Probing for `Analog Devices ADM1029’… No
Probing for `ITE IT8712F’… No
Client found at address 0x50
Probing for `Analog Devices ADM1033’… No
Probing for `Analog Devices ADM1034’… No
Probing for `SPD EEPROM’… No
Probing for `EDID EEPROM’… Yes
(confidence 8, not a hardware monitoring chip)

Next adapter: NVIDIA i2c adapter 2 at 1:00.0 (i2c-2)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 3 at 1:00.0 (i2c-3)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 5 at 1:00.0 (i2c-4)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 6 at 1:00.0 (i2c-5)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 7 at 1:00.0 (i2c-6)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 8 at 1:00.0 (i2c-7)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 9 at 1:00.0 (i2c-8)
Do you want to scan it? (YES/no/selectively): YES

Next adapter: NVIDIA i2c adapter 13 at 1:00.0 (i2c-9)
Do you want to scan it? (YES/no/selectively): YES
Adapter cannot be probed, skipping.
Next adapter: NVIDIA i2c adapter 12 at 1:00.0 (i2c-10)
Do you want to scan it? (YES/no/selectively): YES
Adapter cannot be probed, skipping.
Next adapter: NVIDIA i2c adapter 11 at 1:00.0 (i2c-11)
Do you want to scan it? (YES/no/selectively): YES
Adapter cannot be probed, skipping.
Next adapter: NVIDIA i2c adapter 10 at 1:00.0 (i2c-12)
Do you want to scan it? (YES/no/selectively): YES
Adapter cannot be probed, skipping.
Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `coretemp’:
* Chip `Intel digital thermal sensor’ (confidence: 9)

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
Starting lm_sensors: loading module coretemp [ OK ]
Unloading i2c-dev… OK

Advertisements
Comments
  1. Przemek says:

    Supr!

  2. centos says:

    This is great! Running on my CentOS 6.5 build.

    Thank you!

  3. Benny says:

    Excellent. Thank you. Nice to know my temps via terminal or remote ssh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s