如何在CentOS 7和RedHat Enterprise Linux 7上查看CPU温度
时间:2020-01-09 10:40:50 来源:igfitidea点击:
如何在CentOS Linux 7或Red Hat Enterprise Linux 7服务器上获取CPU温度信息?
如何在装有CentOS Linux 7台式机操作系统的笔记本电脑上读取CPU温度?
您需要安装名为lm_sensor的Linux硬件监视工具。
该工具提供了一些必不可少的命令行实用程序,用于监视Linux系统的硬件运行状况,其中包含硬件运行状况监视硬件,包括CPU和风扇速度。
找出系统版本
$ cat /etc/centos-release
或者
$ cat /etc/redhat-release
输出示例:
CentOS Linux release 7.2.1511 (Core)
在CentOS/RHEL 7上安装lm_sensors软件包
执行以下yum命令:
$ sudo yum install lm_sensors
如何配置lm_sensors
执行以下命令,所有问题回答yes
$ sudo sensors-detect
输出示例:
# sensors-detect revision 6170 (2013-05-20 21:25:22 +0200) # System: ADI Engineering RCC-VE [1.0] 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. Do you want to scan for them? This is totally safe. (YES/no): YES Silicon Integrated Systems SIS5595... No VIA C7 thermal sensor... No VIA Nano thermal sensor... 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 Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES Unloading i2c-dev... OK
如何在CentOS/RHEL 7 Linux上获取CPU温度信息
执行以下命令:
$ sensors
输出示例:
coretemp-isa-0000 Adapter: ISA adapter Core 0: +48.0?C (high = +98.0?C, crit = +98.0?C) Core 1: +48.0?C (high = +98.0?C, crit = +98.0?C) Core 2: +48.0?C (high = +98.0?C, crit = +98.0?C) Core 3: +47.0?C (high = +98.0?C, crit = +98.0?C)
您可以运行以下watch命令以在屏幕上查看数据:
$ watch sensors
如何在CentOS/RHEL 7 Linux上获取硬盘温度信息?
您可以始终安装hddtemp命令来读取CentOS/RHEL 7上的硬盘温度:
$ hddtemp
输出示例:
/dev/sda: Samsung SSD 850 EVO mSATA 500GB: 45?C /dev/sdb: WDC WDS500G1B0A-00H9H0: 42?C /dev/sdc: WDC WDS500G1B0A-00H9H0: 42?C /dev/sdd: WDC WDS500G1B0A-00H9H0: 40?C /dev/sde: WDC WDS500G1B0A-00H9H0: 39?C