linux 查看主板sn_【Linux简单实用小命令033】温度检测:lmsensors

这篇博客介绍了如何在Linux系统中利用lm-sensors工具获取主板、CPU的电压、温度和风扇转速等信息,重点讲解了在CentOS 7.9上的安装和使用过程,并提到了一些基于lm-sensors的图形界面监控工具。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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命令。

0b058d1b92d71392e1e3b4e086d03ec4.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值