Linux下如何使用Lm_Sensors检测cpu温度

发布时间:2022-01-26 11:05:36 作者:小新
来源:亿速云 阅读:1173

这篇文章给大家分享的是有关Linux下如何使用Lm_Sensors检测cpu温度的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

lm_sensors 的软件可以帮助我们来监控主板,CPU 的工作电压,风扇转速、温度等数据。这些数据我们通常在主板的 BIOS 也可以看到。当我们可以在机器运行的时候通过 lm_sensors 随时来监测着 CPU 的温度变化,可以预防呵保护因为 CPU 过热而会烧掉。

Linux下如何使用Lm_Sensors检测cpu温度

使用Lm_Sensors检测cpu温度

Lm_sensors是一个命令行工具,用于显示所有芯片传感器数据的当前读数,包括CPU温度。默认情况下,Ubuntu LInux没有安装Lm_Sensors,因此,我们必须自己安装它们。

bob@bob-PC:~$ sudo apt install lm-sensors
检测硬件

接下来,我们需要检测安装在电脑上的硬件监控芯片。现在我们可以开始检测电脑的硬件传感器了:

bob@bob-PC:~$ sudo sensors-detect# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)# System: VMware, Inc. VMware Virtual Platform [None]# Board: Intel Corporation 440BX Desktop Reference Platform# Kernel: 4.15.0-30Ubuntu-generic x86_64# Processor: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (6/158/10)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 VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             Success!
   (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       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

..................
显示cpu温度

可以通过一下命令查看温度数据了:

bob@bob-PC:~$ sensors
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +33.0°C  

pch_skylake-virtual-0
Adapter: Virtual device
temp1:        +38.5°C  

BAT0-acpi-0
Adapter: ACPI interface
in0:         +12.45 V  

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +39.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +39.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:        +38.0°C  (high = +100.0°C, crit = +100.0°C)

thinkpad-isa-0000
Adapter: ISA adapter
fan1:           0 RPM
temp1:        +38.0°C  
temp2:            N/A  
temp3:         +0.0°C  
temp4:         +0.0°C  
temp5:         +0.0°C  
temp6:         +0.0°C  
temp7:         +0.0°C  
temp8:         +0.0°C  

BAT1-acpi-0
Adapter: ACPI interface
in0:         +12.49 V  

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +38.0°C  (crit = +128.0°C)

还可以使用watch命令实时关注:

bob@bob-PC:~$ watch sensors
使用图形化工具psensor显示cpu温度

使用Psensor,您可以检查以下各项:

最新版本的Psensor还为Ubuntu提供了一个applet指示器,因此在Ubuntu上更容易监控硬件温度。您可以选择在顶部面板中显示温度。它甚至可以在温度超过极限时发送桌面通知。

我们可以使用下面的命令安装Psensor

bob@bob-PC:~/Desktop$ sudo apt install -y psensor

打开ubuntu的launchpad,在里面找到psensor,打开该应用就可以看到多个传感器: Linux下如何使用Lm_Sensors检测cpu温度Linux下如何使用Lm_Sensors检测cpu温度

使用图形化工具hardinfo

Hardinfo是Linux中用于在图形化界面中显示硬件信息的工具。可以使用它检测cpu的温度。以下命令安装hardinfo

bob@bob-PC:~/Desktop$ sudo apt install hardinfo# 运行一下命令打开hardinfobob@bob-PC:~/Desktop$ sudo hardinfo
Linux下如何使用Lm_Sensors检测cpu温度

感谢各位的阅读!关于“Linux下如何使用Lm_Sensors检测cpu温度”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

推荐阅读:
  1. 监控CPU温度脚本安装
  2. CPU温度多少算是正常

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

linux lm_sensors cpu

上一篇:Linux下如何使用speedtest-cli测试网速

下一篇:@Transactional注解怎么用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》