ubuntu 温度监控 linux查看硬件温度
大家好,今天给各位分享ubuntu 温度监控的一些知识,其中也会对linux查看硬件温度进行解释,文章篇幅可能偏长,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在就马上开始吧!
如何在 Ubuntu 中检查笔记本 CPU 的温度
1,在安装Psensor前,需要安装和配置lm-sensors,这是一个用于硬件监控的命令行工具。如果想要测量磁盘温度,还需要安装hddtemp。要安装这些工具,运行下面的这些命令:
2,接着开始检测硬件传感器:
3,要确保已经工作,运行下面的命令:
4,它会给出下面这样的输出:
acpitz-virtual-0
Adapter:Virtualdevice
temp1:+43.0°C(crit=+98.0°C)
coretemp-isa-0000
Adapter:ISA adapter
Physicalid0:+44.0°C(high=+100.0°C,crit=+100.0°C)
Core0:+41.0°C(high=+100.0°C,crit=+100.0°C)
Core1:+40.0°C(high=+100.0°C,crit=+100.0°C)
5,如果一切看上去没问题,使用下面的命令安装Psensor:安装完成后,在Unity Dash中运行程序,就可以监控到cpu的温度了。
如何在Ubuntu Linux中获取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,您可以检查以下各项:
主板、CPU传感器和NVidia GPU的温度
硬盘驱动器的温度
风扇的转速
监视CPU使用情况
最新版本的Psensor还为Ubuntu提供了一个applet指示器,因此在Ubuntu上更容易监控硬件温度。您可以选择在顶部面板中显示温度。它甚至可以在温度超过极限时发送桌面通知。
我们可以使用下面的命令安装Psensor:
bob@bob-PC:~/Desktop$ sudo apt install-y psensor
打开ubuntu的launchpad,在里面找到psensor,打开该应用就可以看到多个传感器:
使用图形化工具hardinfo
Hardinfo是Linux中用于在图形化界面中显示硬件信息的工具。可以使用它检测cpu的温度。以下命令安装hardinfo:
bob@bob-PC:~/Desktop$ sudo apt install hardinfo
#运行一下命令打开hardinfo
bob@bob-PC:~/Desktop$ sudo hardinfo
总结
在本教程中,我们将学习如何从命令行和桌面获取Ubuntu Linux上的CPU温度。
如何在Ubuntu Linux上获取CPU温度
硬件过热通常会导致系统性能下降。监视硬件温度可以帮助您诊断系统的CPU过热问题。笔记本电脑过热的原因通常来自CPU,GPU(显卡)或硬盘温度过高。
如果您的笔记本电脑发烫,请确保其通风口没被遮挡,以免限制气流。您必须保证笔记本电脑散热良好,不要满是灰尘,并删除那些占用CPU过多的不必要的软件。同样,在省电模式下运行也可以避免笔记本电脑过热。
在本文中,我们将学习如何从命令行以及从桌面获取Ubuntu Linux上的CPU温度。
Lm_sensors是一个命令行工具,用于显示所有芯片传感器数据的当前读数,包括CPU温度。默认情况下,在使用前我们必须自己安装这个命令。
因此,首先让我们检查如何在各种Linux发行版上安装lm-sensors软件包。
在Ubuntu/ Debian上,按键盘上的快捷键CTRL+ ALT+ T在Ubuntu上打开终端。在我的Ubuntu 18.04,Ubuntu 20.04和Debian 10上,运行以下命令安装Lm_Sensors:
在Fedora上,使用dnf命令在Fedora Linux上安装lm_sensors。
在CentOS/ RHEL上,使用yum命令在CentOS 7和RHEL 7上安装lm_sensors。
现在我们可以开始检测笔记本电脑的硬件传感器了。这将提供有关以下信息:
我们通过输入命令sudo sensor-detect来做到这一点:
通过前面的操作,我们已经成功安装了lm-sensors软件包,并且在由Ubuntu笔记本电脑上成功检测到支持的传感器。
现在我们可以执行以下命令来查看温度数据:
请注意,结果将因您的计算机而异。
您还可以使用watch命令持续运行传感器命令,该命令将在屏幕上显示传感器输出:
我们将使用GUI工具Psensor,该工具可让您以图形界面的方式监视Linux上的硬件温度。
使用Psensor,您可以检查以下内容:
Psensor的最新版本还为Ubuntu提供了一个桌面指示器,因此,它使得在Ubuntu上监视硬件温度更加容易。您可以选择在顶部面板本身中显示温度。当温度超过限制时,它甚至可以发送桌面通知。
我们可以使用以下命令继续安装Psensor:
Ubuntu/ Debian的
Fedora
CentOS和RHEL
安装后,通过在Unity Dashboard中查找来运行该应用程序。在第一次运行时,您可以配置要使用Psensor收集的统计信息(传感器)。
Psensor温度监控器
Psensor CPU温度曲线图
如果要在顶部面板中显示CPU统计信息(包括温度),请转到“传感器首选项”。然后在“应用程序指示器”菜单下,选择要为其显示温度的组件。然后检查标签选项中的“显示传感器”。
Hardinfo是Linux中用于在GUI中显示硬件信息的系统分析器和基准测试工具。您也可以从GUI-设备-传感器检查CPU温度。
在Ubuntu和Debian上,在终端上运行以下命令,以在GUI上显示硬件信息。
HardInfo-CPU传感器
Hardinfo处理器
i7z是一个命令行工具,可在Intel Core i7,i5,i3处理器上打印CPU信息,并报告CPU温度。i7z需要以root或具有 sudo特权的用户身份运行。
要在ubuntu上安装,请运行以下命令:
i7z命令输出
除此之外,您可以尝试使用TLP)和Thermald,可以帮助您控制Linux上的CPU温度。 Cpufreq是另一个可以帮助您节省电池电量并减少笔记本电脑过热的工具,在Ubuntu上效果很好。
如果要在没有第三方工具的情况下检查温度,请查看/sys/devices/virtual/thermal/thermal_thermal1/zone1/ temp文件。
要检查硬盘温度,可以安装hddtemp软件包。
最后,如果您有任何疑问或反馈,请随时发表评论。