不用安装其它软件的方法:
cat /sys/class/thermal/thermal_zone0/temp
返回的数字除以1000 就是摄氏度
可以用下面的命令转换为摄氏度 °C
echo $[$(cat /sys/class/thermal/thermal_zone0/temp)/1000]°
返回的数字显示为摄氏度了
一般用上面方法就可以知道CPU 的温度,也可以使用 sensors 简单查看 先安装
apt-get update
apt-get install lm-sensors
检测传感器(一直输入yes,可能有部分需要enter回车):
执行sensors查看CPU的温度:
返回数据
root@pve:~# sensors
acpitz-acpi-0
Adapter: ACPI interface
temp1: +27.8°C
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +29.0°C (high = +80.0°C, crit = +100.0°C)
Core 4: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 8: +33.0°C (high = +80.0°C, crit = +100.0°C)
Core 12: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 16: +30.0°C (high = +80.0°C, crit = +100.0°C)
Core 20: +30.0°C (high = +80.0°C, crit = +100.0°C)
Core 24: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 25: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 26: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 27: +34.0°C (high = +80.0°C, crit = +100.0°C)
Core 28: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 29: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 30: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 31: +35.0°C (high = +80.0°C, crit = +100.0°C)
nvme-pci-e100
Adapter: PCI adapter
Composite: +38.9°C (low = -273.1°C, high = +81.8°C)
(crit = +84.8°C)
Sensor 1: +38.9°C (low = -273.1°C, high = +65261.8°C)
Sensor 2: +43.9°C (low = -273.1°C, high = +65261.8°C)
|