重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1267|回复: 0
打印 上一主题 下一主题

[系统管理] linux 实时查看cpu温度

[复制链接]
跳转到指定楼层
楼主
发表于 2022-8-24 11:03:50 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
LINUX下,要检查物理服务器CPU温度,可以使用 lm_sensors 软件实现,该软件是一款linux的硬件监控的软件,可以帮助我们来监控主板,CPU的工作电压,风扇转速、温度等数据。这些数据我们通常在主板的 BIOS也可以看到。当我们可以在机器运行的时候通过lm_sensors随时来监测着CPU的温度变化,可以预防和保护因为CPU过热而会烧掉。


1.yum安装lm_sensors
    [root@hisdb02 ~]# yum install lm_sensors
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
os                                                                                                                           | 4.1 kB  00:00:00     
(1/2): os/group_gz                                                                                                           | 136 kB  00:00:00     
(2/2): os/primary_db                                                                                                         | 3.6 MB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package lm_sensors.x86_64 0:3.3.4-11.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================
Package                              Arch                             Version                                   Repository                    Size
====================================================================================================================================================
Installing:
lm_sensors                           x86_64                           3.3.4-11.el7                              os                           137 k

Transaction Summary
====================================================================================================================================================
Install  1 Package

Total download size: 137 k
Installed size: 409 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : lm_sensors-3.3.4-11.el7.x86_64                                                                                                   1/1
  Verifying  : lm_sensors-3.3.4-11.el7.x86_64                                                                                                   1/1

Installed:
  lm_sensors.x86_64 0:3.3.4-11.el7                                                                                                                  

Complete!
[root@hisdb02 ~]#

2.查看sensors版本
[root@hisdb02 ~]# sensors -v
sensors version 3.3.4 with libsensors version 3.3.4


3.传感器探测
[root@hisdb02 ~]# sensors-detect

# sensors-detect revision 6170 (2013-05-20 21:25:22 +0200)
# System: LENOVO Lenovo System x3850 X6                               -[6241AC1]- [09]
# Board: LENOVO 00YA700

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 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

后续询问 点YES 既可


4.查看温度
[root@hisdb02 ~]# sensors
i350bb-pci-0100
Adapter: PCI adapter
loc1:         +46.0°C  (high = +120.0°C, crit = +110.0°C)

[root@hisdb02 ~]#


可以看到我们的CPU温度,46 度。

注意,如果是虚拟机,检查不到传感器的。



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-26 18:56 , Processed in 0.104887 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表