怎么在温度是操作系统上面安装linux操作系统
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了怎么在温度是操作系统上面安装linux操作系统相关的知识,希望对你有一定的参考价值。
Linux上有几款用户空间工具,让你可以检查和监测系统各个部件的温度。lm-sensors是一款软件工具,可以借助嵌入在硬件的传感器,监测温度、电压、湿度和风扇运行状况。hddtemp这款工具可以通过S.M.A.R.T.数值,测量硬盘的温度。psensor是一款用于监测温度的图形化前端程序,它能够直观地显示处理器、英伟达/ATI/AMD图形处理器(GPU)和硬盘等部件的温度数值。
在下文中,我将介绍如何设置psensor,以监测处理器和硬盘的温度。
将psensor安装在Linux桌面上
psensor可以根据从其他工具(比如lm-sensors和hddtemp)获得的信息,直观地显示系统温度。因而,你需要将psensor连同那些必要的工具一并安装。
将psensor安装在Debian或Ubuntu上:
$ sudo apt-get install lm-sensors hddtemp psensor
将psensor安装在Ubuntu上的另一个办法是,使用含有一款较新版本psensor的个人软件包仓库(PPA)软件库。
$ sudo add-apt-repository ppa:jfi/ppa
$ sudo apt-get update
$ sudo apt-get install lm-sensors hddtemp psensor
将psensor安装在Fedora上:
$ sudo yum install lm_sensors hddtemp
$ sudo yum install gcc gtk3-devel GConf2-devel lm_sensors-devel cppcheck libatasmart-devel libcurl-devel json-c-devel libmicrohttpd-devel help2man libnotify-devel libgtop2-devel make
$ wget http://wpitchoune.net/psensor/files/psensor-0.8.0.3.tar.gz
$ tar xvfvz psensor-0.8.0.3.tar.gz
$ cd psensor-0.8.0.3
$ ./configure
$ make
$ sudo make install
由于GTK3库方面的需要,psensor与CentOS或RHEL 6的GNOME 2桌面并不兼容。
在Linux上配置psensor
在启动psensor之前,你需要首先配置lm_sensors和hddtemp。
lm_sensors的配置
想配置lm_sensors,就要运行下面这个命令。针对每个问题,都选择YES。
$ sudo sensors-detect
这个命令会搜索并检测你硬件(包括处理器、内存控制器和输入/输出芯片)中的嵌入式传感器,并且自动查明哪些驱动程序模块需要装入,以检查你系统的温度。
一旦传感器搜索和检测工作完成,会要求你将检测到的一个或多个驱动程序模块添加到/etc配置,那样它们可以在系统启动时自动装入。 参考技术A 制作linux安装u盘,然后重启从u盘引导进行安装 参考技术B 虚拟机 参考技术C vmware虚拟机
Linux系统之温度监控工具——lm_sensors的安装和基本使用
(Linux系统之温度监控工具——lm_sensors的安装和基本使用)
一、lm_sensors介绍
二、检测安装环境
1.检查yum仓库
[root@192 ~]# yum repolist all |grep enable
base/7/x86_64 CentOS-7 - Base - mirrors.aliyun.com enabled: 10,072
epel/x86_64 Extra Packages for Enterprise Linux enabled: 13,758
extras/7/x86_64 CentOS-7 - Extras - mirrors.aliyun.c enabled: 512
updates/7/x86_64 CentOS-7 - Updates - mirrors.aliyun. enabled: 4,088
2.检查系统版本
[root@server data]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
三、安装lm_sensors
[root@192 ~]# yum install lm_sensors -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.1 MB 00:00:00
(2/3): epel/x86_64/primary_db | 7.0 MB 00:00:04
(3/3): updates/7/x86_64/primary_db | 16 MB 00:00:10
Resolving Dependencies
--> Running transaction check
---> Package lm_sensors.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be installed
--> Processing Dependency: lm_sensors-libs = 3.4.0-8.20160601gitf9185e5.el7 for package: lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64
--> Running transaction check
---> Package lm_sensors-libs.x86_64 0:3.4.0-6.20160601gitf9185e5.el7 will be updated
---> Package lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================
Installing:
lm_sensors x86_64 3.4.0-8.20160601gitf9185e5.el7 base 141 k
Updating for dependencies:
lm_sensors-libs x86_64 3.4.0-8.20160601gitf9185e5.el7 base 42 k
Transaction Summary
===============================================================================================================================================================================
Install 1 Package
Upgrade ( 1 Dependent package)
Total download size: 182 k
Downloading packages:
No Presto metadata available for base
(1/2): lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm | 42 kB 00:00:00
(2/2): lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm | 141 kB 00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 734 kB/s | 182 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 1/3
Installing : lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64 2/3
Cleanup : lm_sensors-libs-3.4.0-6.20160601gitf9185e5.el7.x86_64 3/3
Verifying : lm_sensors-3.4.0-8.20160601gitf9185e5.el7.x86_64 1/3
Verifying : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 2/3
Verifying : lm_sensors-libs-3.4.0-6.20160601gitf9185e5.el7.x86_64 3/3
Installed:
lm_sensors.x86_64 0:3.4.0-8.20160601gitf9185e5.el7
Dependency Updated:
lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7
Complete!
四、侦测硬件
[root@server data]# sensors-detect
# sensors-detect revision 3.4.0-8 (2016-06-01)
# System: onebot Mini [Default string]
# Board: Default string Default string
# Kernel: 3.10.0-957.el7.x86_64 x86_64
# Processor: Intel(R) Celeron(R) N5095 @ 2.00GHz (6/156/0)
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 youre 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
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE... No
Trying family `SMSC... No
Trying family `VIA/Winbond/Nuvoton/Fintek... No
Trying family `ITE... Yes
Found unknown chip with ID 0x8613
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE... 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 dont 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): yes
Probing for `IPMI BMC KCS at 0xca0... No
Probing for `IPMI BMC SMIC at 0xca8... No
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): yes
Probing for `National Semiconductor LM78 at 0x290... No
Probing for `National Semiconductor LM79 at 0x290... No
Probing for `Winbond W83781D at 0x290... No
Probing for `Winbond W83782D at 0x290... 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): yes
Found unknown SMBus adapter 8086:4da3 at 0000:00:1f.4.
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)
Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): yes
Unloading i2c-dev... OK
五、查看温度
[root@server data]#
[root@server data]# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +119.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +53.0°C (high = +105.0°C, crit = +105.0°C)
Core 0: +48.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +48.0°C (high = +105.0°C, crit = +105.0°C)
Core 2: +48.0°C (high = +105.0°C, crit = +105.0°C)
Core 3: +48.0°C (high = +105.0°C, crit = +105.0°C)
iwlwifi-virtual-0
Adapter: Virtual device
temp1: N/A
六、动态监控温度
[root@server data]# watch sensors
以上是关于怎么在温度是操作系统上面安装linux操作系统的主要内容,如果未能解决你的问题,请参考以下文章
装linux系统怎么加载RAID驱动,我的硬盘做了RAID5,驱动已经正确装在了USB软盘上面,请哪位高手指导下!