在centos 5.4 X64的平台上,想通过sensors 监控CPU的温度,在安装配置的过程中走了很多弯路,在查找coretemp module时走了很多弯路,因为centos 5.4 的kernel 是 2.6.18的,并不包含coretemp 模块,这里记录一下安装的过程以及将coretemp模块放在网站上,供大家下载
第一步|:安装lm_sensors
安装完成后运行:
sensors-detect
再安装过程中,遇到每一个选项都是回答:YES,之后会提示
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
启动 lm_sensors:No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
[失败]
遇到这个问题的时候,搜了很多的帖子,均是建议下载最新的sensors-detect,于是乎
wget http://dl.lm-sensors.org/lm-sensors/files/sensors-detect
Chmod 755 sensors-detect
执行./sensors-detect
一路YES下去,提示error
Note: there is no driver for IPMI BMC KCS yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.
Warning: the required module coretemp is not currently installed
on your system. Check http://www.lm-sensors.org/wiki/Devices for
driver availability.
No modules to load, skipping modules configuration.
好吧,这里是看到了coretemp的模块问题,google 搜索coretemp的模块
Coretemp 模块下载
http://down.51cto.com/data/849707
这个是一个zip包,里面包含了I686和X64的版本RPM安装文件
查看:uname -r
安装:rpm -ivh kmod-coretemp-1.1-2.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:kmod-coretemp ########################################### [100%]
命令:modinfo coretemp 查看
filename: /lib/modules/2.6.18-164.el5/weak-updates/coretemp/coretemp.ko
license: GPL
description: Intel Core temperature monitor
author: Rudolf Marek <[email protected]>
srcversion: 6E167863013C68E51A188A6
depends: hwmon
vermagic: 2.6.18-92.el5 SMP mod_unload gcc-4.1
命令:modprobe coretemp 加载
命令:]# lsmod | grep coretemp 查看是否正确加载
coretemp 42496 0
hwmon 36553 1 coretemp
当以上几步确定无误后,再次执行./sensors-detect
一路回YES
Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): YES
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD K10 thermal sensors... No
Intel Core family thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp' (should be inserted):
Detects correctly:
* Chip `Intel Core family thermal sensor' (confidence: 9)
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
启动 lm_sensors:[确定]
到这一步时,我们的安装已经完成,下面就可以使用命令:sensors 查看当前CPU的温度信息
sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +44°C (high = +100°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +40°C (high = +100°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +44°C (high = +100°C)
coretemp-isa-0003
Adapter: ISA adapter
Core 3: +43°C (high = +100°C)
coretemp-isa-0004
Adapter: ISA adapter
Core 4: +43°C (high = +100°C)
coretemp-isa-0005
Adapter: ISA adapter
Core 5: +45°C (high = +100°C)
coretemp-isa-0006
Adapter: ISA adapter
Core 6: +43°C (high = +100°C)
coretemp-isa-0007
Adapter: ISA adapter
Core 7: +45°C (high = +100°C)