学习啦 > 学习电脑 > 操作系统 > Linux教程 > linux查看cpu温度命令

linux查看cpu温度命令

时间: 佳洲1085 分享

学习啦在线学习网linux查看cpu温度命令

学习啦在线学习网   我们可能会关心自己的电脑或者服务器CPU的温度,如何在linux中快速查看CPU温度呢?下面由学习啦小编为大家整理了linux查看cpu温度命令的相关知识,希望大家喜欢!

  Linux查看cpu温度命令

学习啦在线学习网   lm_sensors提供了一套方案,可以自动侦测主板传感器的型号和读取方式,可以在命令行模式下快速安装运行。

  在CentOS系统中安装使用实例如下:

  #yum install -y lm_sensors

  然后运行sensors-detect来探测传感器类型,此命令会给出一些问题,一律回答Yes即可:

学习啦在线学习网   [root@vm-36 ~]# sensors-detect

学习啦在线学习网   Stopping lm_sensors: [FAILED]

  # sensors-detect revision 1.1

学习啦在线学习网   # System: Dell Inc. PowerEdge R710

  # Board: Dell Inc. 0XDX06

  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

学习啦在线学习网   AMD K8 thermal sensors... No

学习啦在线学习网   AMD Family 11h thermal sensors... No

学习啦在线学习网   Intel digital thermal sensor... Success!

  (driver `coretemp')

  Intel AMB FB-DIMM thermal sensor... No

  VIA C7 thermal and voltage sensors... 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):

  Probing for Super-I/O at 0x2e/0x2f

  Trying family `National Semiconductor'... No

学习啦在线学习网   Trying family `SMSC'... Yes

  Found `SMSC EMC2700LPC Super IO'

  (no information available)

  Probing for Super-I/O at 0x4e/0x4f

  Trying family `National Semiconductor'... No

  Trying family `SMSC'... No

  Trying family `VIA/Winbond/Nuvoton/Fintek'... No

学习啦在线学习网   Trying family `ITE'... No

学习啦在线学习网   Some systems (mainly servers) implement IPMI, a set of common interfaces

  through which system health data may be retrieved, amongst other things.

学习啦在线学习网   We first try to get the information from SMBIOS. If we don't find it

  there, we have to read from arbitrary I/O ports to probe for such

  interfaces. This is normally safe. Do you want to scan for IPMI

  interfaces? (YES/no):

学习啦在线学习网   Found `IPMI BMC KCS' at 0xca8... Success!

  (confidence 8, driver `ipmisensors')

  Some hardware monitoring chips are accessible through the ISA I/O ports.

学习啦在线学习网   We have to write to arbitrary I/O ports to probe them. This is usually

  safe though. Yes, you do have ISA I/O ports even if you do not have any

学习啦在线学习网   ISA slots! Do you want to scan the ISA I/O ports? (YES/no):

  Lastly, we can probe the I2C/SMBus adapters for connected hardware

学习啦在线学习网   monitoring devices. This is the most risky part, and while it works

学习啦在线学习网   reasonably well on most systems, it has been reported to cause trouble

学习啦在线学习网   on some systems.

学习啦在线学习网   Do you want to probe the I2C/SMBus adapters now? (YES/no):

学习啦在线学习网   Sorry, no supported PCI bus adapters found.

学习啦在线学习网   Module i2c-dev loaded successfully.

学习啦在线学习网   Now follows a summary of the probes I have just done.

  Just press ENTER to continue:

  Driver `coretemp':

  * Chip `Intel digital thermal sensor' (confidence: 9)

  Driver `ipmisensors':

学习啦在线学习网   * ISA bus, address 0xca8

  Chip `IPMI BMC KCS' (confidence: 8)

  Warning: the required module ipmisensors is not currently installed

  on your system. If it is built into the kernel then it's OK.

  Otherwise, check http://www.lm-sensors.org/wiki/Devices for

  driver availability.

学习啦在线学习网   Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no):

学习啦在线学习网   Starting lm_sensors: loading module ipmi-si coretemp [ OK ]

  Unloading i2c-dev... OK

  最后运行sensors命令来查看CPU温度

  [root@vm-36 ~]# sensors

  coretemp-isa-0000

  Adapter: ISA adapter

  Core 0: +44.0°C (high = +85.0°C, crit = +95.0°C)

  Core 1: +44.0°C (high = +85.0°C, crit = +95.0°C)

学习啦在线学习网   Core 9: +46.0°C (high = +85.0°C, crit = +95.0°C)

学习啦在线学习网   Core 10: +48.0°C (high = +85.0°C, crit = +95.0°C)

学习啦在线学习网   coretemp-isa-0001

  Adapter: ISA adapter

  Core 0: +45.0°C (high = +85.0°C, crit = +95.0°C)

学习啦在线学习网   Core 1: +45.0°C (high = +85.0°C, crit = +95.0°C)

  Core 9: +49.0°C (high = +85.0°C, crit = +95.0°C)

  Core 10: +46.0°C (high = +85.0°C, crit = +95.0°C)

  我们还可以将lm_sensors服务设置为自动启动,以便自动加载相关模块:

  [root@vm-36 ~]# chkconfig lm_sensors on

学习啦在线学习网   [root@vm-36 ~]# service lm_sensors start

学习啦在线学习网   Starting lm_sensors: loading module ipmi-si coretemp [ OK ]

3612194