有一個新的需求 要知道cpu的溫度
查了一下資料
可以使用lm-sensors來得到資料
步驟如下
apt-get install lm-sensors
(yum install lm-sensors)
#sensors-detect
一直按Enter直到看到
#----cut here----
#...................................
#....................
i2c-i801
# Chip drivers
# no driver for Winbond W83L785R/G yet
lm85
#----cut here----
在二個cut here 中間找到的就是必需insert的module
以上為例
# modprobe i2c-i801
# modprobe lm85
接下來輸入
# sensors
就會出現cpu溫度之類的監控訊息
adm1027-i2c-3-2e
Adapter: SMBus I801 adapter at e000
V1.5: +1.31 V (min = +0.00 V, max = +3.32 V)
VCore: +1.49 V (min = +0.00 V, max = +2.99 V)
V3.3: +3.30 V (min = +0.00 V, max = +4.38 V)
V5: +5.08 V (min = +0.00 V, max = +6.64 V)
V12: +11.97 V (min = +0.00 V, max = +15.94 V) ALARM
CPU_Fan: 3941 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 1882 RPM (min = 0 RPM)
CPU Temp: +48.8°C (low = -127.0°C, high = +127.0°C)
Board Temp: +46.0°C (low = -127.0°C, high = +127.0°C)
Remote Temp: +45.5°C (low = -127.0°C, high = +127.0°C)
cpu0_vid: +1.525 V
但在hp的机器中出現的是
#----cut here----
# You must also install and load the IPMI modules
ipmi-si
# Chip drivers
# Warning: the required module ipmisensors is not currently installed
# on your system. For status of 2.6 kernel ports check
# http://www.lm-sensors.org/wiki/Devices. If driver is built
# into the kernel, or unavailable, comment out the following line.
ipmisensors
#----cut here----
但無法使用
modprobe ipmisensors
會有error
但使用
modprobe coretemp
接下來輸入
#sensor
出現
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +30.0°C (high = +85.0°C, crit = +95.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +37.0°C (high = +85.0°C, crit = +95.0°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +33.0°C (high = +85.0°C, crit = +95.0°C)
coretemp-isa-0003
Adapter: ISA adapter
Core 3: +38.0°C (high = +85.0°C, crit = +95.0°C)
就可以看到了
沒有留言:
張貼留言