Answers:
使用i3status
我相信您可以略微更改您的配置,以便/sys
通过提供一条通往其核心价值的路径来直接获取其核心温度。因此,将您的规则更改为以下内容:
order += "cpu_temperature 1"
# and more if you like...
# order += "cpu_temperature 2"
#...
cpu_temperature 1 {
format = "T: %degrees °C"
path = "/sys/devices/platform/coretemp.0/temp1_input"
}
# cpu_temperature 2 {
# format = "T: %degrees °C"
# path = "/sys/devices/platform/coretemp.0/temp2_input"
# }
$ cat /proc/acpi/thermal_zone/THM0/temperature
temperature: 72 C
$ acpi -t
Thermal 0: ok, 64.0 degrees C
从acpi
手册页:
-t | --thermal
show thermal information
$ cat /sys/bus/acpi/devices/LNXTHERM\:01/thermal_zone/temp
70000
如果您像这样安装lmsensors软件包:
Fedora / CentOS / RHEL:
$ sudo yum install lm_sensors
Debian / Ubuntu:
$ sudo apt-get install lm-sensors
检测您的硬件:
$ sudo sensors-detect
您也可以手动安装模块,例如:
$ sudo modprobe coretemp
$ modprobe i2c-i801
注意:传感器检测器应检测到您的特定硬件,因此您可能需要modprobe <my driver>
代替上面的第二条命令。
在我的系统上,我加载了以下i2c模块:
$ lsmod | grep i2c
i2c_i801 11088 0
i2c_algo_bit 5205 1 i915
i2c_core 27212 5 i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
现在运行sensors
应用程序以查询结果温度:
$ sudo sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +68.0°C (crit = +100.0°C)
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 3831 RPM
temp1: +68.0°C
temp2: +0.0°C
temp3: +0.0°C
temp4: +0.0°C
temp5: +0.0°C
temp6: +0.0°C
temp7: +0.0°C
temp8: +0.0°C
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +56.0°C (high = +95.0°C, crit = +105.0°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +57.0°C (high = +95.0°C, crit = +105.0°C)
这是在我的具有i5 M560的Thinkpad T410上。这是核心之一:
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz
stepping : 5
cpu MHz : 1199.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt aes lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips : 5319.22
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
temp2_input
一个得到第二个核心的温度,依此类推...
就我而言,我必须从以下内容读取值:
/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
我的i3status配置:
cpu_temperature 0 {
format = "T: %degrees °C"
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input"
}
/proc/acpi/thermal_zone
我的案子不存在(ubuntu 13.04)