lm-sensors可以獲得主板,CPU工作電壓、溫度、風扇轉速等信息。
大多數現代主板都包含某種形式的硬體監視晶片。
這些晶片讀取諸如晶片溫度,風扇轉速和電壓電平。
有很多不同的晶片可以由主板製造商獲得大致相同的結果。
github 地址:https://github.com/groeck/lm-sensors
作業系統:CentOS 7.9
[root@yaomm sbin]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)安裝溫度檢測軟體:lm-sensors
yum install lm_sensors監測所有能監測的溫度傳感器
sh -c "yes|sensors-detect"安裝過程:
[root@yaomm sbin]# sh -c "yes|sensors-detect"
# sensors-detect revision 3.4.0-8 (2016-06-01)
# System: Default string Default string [Default string]
# Kernel: 3.10.0-1160.el7.x86_64 x86_64
# Processor: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz (6/55/9)
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): Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
……
……
……
Driver `nct6775':
* ISA bus, address 0xa20
Chip `Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors' (confidence: 9)
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): Unloading i2c-dev... OK
***************************************************************
Warning: the preferred way to run this script non-interactively
is with option --auto. Other methods are discouraged and may
stop working at some point in the future.
***************************************************************使用命令sensors檢測CPU溫度
[root@yaomm sbin]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +30.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +30.0°C (high = +105.0°C, crit = +105.0°C)
Core 2: +32.0°C (high = +105.0°C, crit = +105.0°C)
Core 3: +32.0°C (high = +105.0°C, crit = +105.0°C)長時間監控,使用watch命令,每兩秒刷新一次
[root@yaomm yaomm]# watch sensors
Every 2.0s: sensors Thu Dec 24 17:26:42 2020
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +31.0°C (high = +105.0°C, crit = +105.0°C)
Core 2: +33.0°C (high = +105.0°C, crit = +105.0°C)
Core 3: +33.0°C (high = +105.0°C, crit = +105.0°C)擴展基於lm-sensors的圖形控制臺工具
http://sensors-applet.sourceforge.net/
https://01.org/powertop/
https://wpitchoune.net/psensor/
https://amanusk.github.io/s-tui/
gkrellm
xfce4-sensors-plugin
GNOME Computer Temperature Monitor
ksensors
參考文檔1、Centos 7. 6 Install lm_sensors https://blog.csdn.net/hanzheng260561728/article/details/97011084
2、CentOS安裝並查看lm_sensors https://www.cnblogs.com/jiawenhuangzi/p/13845360.html
3、lm_sensors for archLinux https://wiki.archlinux.org/index.php/Lm_sensors_(簡體中文)
----
公眾號:Linux常用命令
這是一個神奇的公眾號,總是會有一些有趣、實用的Linux命令。