成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

CentOS sensors軟件監(jiān)控主板CPU數(shù)據(jù)

系統(tǒng) Linux
在Linux下有個叫CentOS sensors的軟件可以幫助我們來監(jiān)控主板,CPU的工作電壓,風(fēng)扇轉(zhuǎn)速、溫度等數(shù)據(jù)。這些數(shù)據(jù)我們通常在主板的 BIOS也可以看到。當(dāng)我們可以在機(jī)器運(yùn)行的時候通過CentOS sensors隨時來監(jiān)測著CPU的溫度變化,可以預(yù)防呵保護(hù)因為CPU過熱而會燒掉。

xx對于電腦使用的玩家的常用軟件,然后我就學(xué)習(xí)及深入的研究xx,在這里和大家一起探討xx的使用方法,希望對大家有用。用MRTG監(jiān)測Linux系統(tǒng)CPU溫度

在Linux下有個叫CentOS sensors的軟件可以幫助我們來監(jiān)控主板,CPU的工作電壓,風(fēng)扇轉(zhuǎn)速、溫度等數(shù)據(jù)。這些數(shù)據(jù)我們通常在主板的 BIOS也可以看到。當(dāng)我們可以在機(jī)器運(yùn)行的時候通過CentOS sensors隨時來監(jiān)測著CPU的溫度變化,可以預(yù)防呵保護(hù)因為CPU過熱而會燒掉。

1. 安裝CentOS sensors現(xiàn)在基本上每個Linux都已經(jīng)有CentOS sensors包了,我們主要安裝了就可以了。或者我們也可以通過源文件來自己編譯。1)在FC,RH, CENTOS下,用rpm:[root@securitycn ~]# rpm -ivh lm_sensors-2.10.0-3.1.i386.rpm3)編譯源文件安裝我們可以通過:這里下載源文件這里我們要注意的問題是要先安裝libsysfs庫,是Sysfsutils,Sysfsutils-devel軟件

  1. tar xzvf lm-sensors-xxx.tar.gz  
  2. make user  
  3. make user_install testing 

下面我們就用一些簡單的命令來利用CentOS sensors來得到CPU的數(shù)據(jù)。我們要用root的身份來:sensors-detect,然后它會自動搜索主板上的chipset和相應(yīng)的driver,我們?nèi)看餣ES就可以了[root@securitycn ~]# sensors-detect

  1. # sensors-detect revision 1.413 (2006/01/19 20:28:00)  
  2. This program will help you determine which I2C/SMBus modules you need to  
  3. load to use lm_sensors most effectively. You need to have i2c and  
  4. lm_sensors installed before running this program.  
  5. Also, you need to be `root', or at least have access to the /dev/i2c-*  
  6. files, for most things.  
  7. If you have patched your kernel and have some drivers built in, you can  
  8. safely answer NO if asked to load some modules. In this case, things may  
  9. seem a bit confusing, but they will still work.  
  10.  
  11. It is generally safe and recommended to accept the default answers to all  
  12. questions, unless you know what you're doing.  
  13.  
  14. We can start with probing for (PCI) I2C or SMBus adapters.  
  15. You do not need any special privileges for this.  
  16. Do you want to probe now? (YES/no):   

全部默認(rèn)YES即可。然后我們啟動CentOS sensors:

  1. /etc/init.d/lm_sensors start  
  2. Starting lm_sensors: [ OK ] 

我們可以通過lsmod來確定我們需要的driver已經(jīng)加載了沒有

  1. lsmod | grep i2c  
  2. i2c_isa 9153 2 w83627hf,w83781d  
  3. i2c_i801 11341 0   
  4. i2c_dev 12613 0   
  5. i2c_ec 9025 1 sbs  
  6. i2c_core 23745 6 w83627hf,w83781d,i2c_isa,i2c_i801,i2c_dev,i2c_ec 

然后我們用CentOS sensors的命令就可以了:

  1. [root@securitycn ~]# sensors  
  2. w83627hf-isa-0290  
  3. Adapter: ISA adapter  
  4. VCore 1: +3.33 V (min = +0.00 V, max = +0.00 V) ALARM   
  5. VCore 2: +3.36 V (min = +0.00 V, max = +0.00 V) ALARM   
  6. +3.3V: +0.93 V (min = +3.14 V, max = +3.46 V) ALARM   
  7. +5V: +5.11 V (min = +4.73 V, max = +5.24 V)   
  8. +12V: +4.56 V (min = +10.82 V, max = +13.19 V) ALARM   
  9. -12V: -7.10 V (min = -13.18 V, max = -10.88 V) ALARM   
  10. -5V: -1.93 V (min = -5.25 V, max = -4.75 V) ALARM   
  11. V5SB: +5.51 V (min = +4.73 V, max = +5.24 V) ALARM   
  12. VBat: +0.02 V (min = +2.40 V, max = +3.60 V) ALARM   
  13. fan1: 0 RPM (min = 2732 RPM, div = 2) ALARM   
  14. fan2: 0 RPM (min = 0 RPM, div = 2)   
  15. fan3: 0 RPM (min = 0 RPM, div = 2)   
  16. temp1: +38癈 (high = +50癈, hyst = +45癈) sensor = thermistor   
  17. temp2: +33.5癈 (high = +80癈, hyst = +75癈) sensor = thermistor   
  18. temp3: +33.5癈 (high = +80癈, hyst = +75癈) sensor = thermistor   
  19. vid: +0.000 V (VRM Version 10.0)  
  20. alarms:   
  21. beep_enable:  
  22. Sound alarm enabled 

這里我們可以看到溫度還沒有相對應(yīng)CPU,我們主要稍微修改一下/etc/sensors.conf就可以了,不過其實都不用我們自己去動手,一般我們都可以從主板生產(chǎn)商那里下載到配置文件。通過CentOS sensors我們就可以得到主板溫度,CPU電壓,風(fēng)扇轉(zhuǎn)速這些信息。我們可以根據(jù)這些數(shù)據(jù)來監(jiān)察系統(tǒng)的運(yùn)行情況來預(yù)防系統(tǒng)的問題。

接下來讓它和MRTG整合在一起吧

  1. [root@securitycn ~]# cd /usr/local/mrtg/bin  
  2. [root@securitycn ~]# vi temp.sh  
  3. #內(nèi)容如下  
  4. #!/bin/bash  
  5. cputemp=`/usr/bin/sensors | grep temp1 |awk '{print $2}'|cut -c 2-4` #這句是說找出有temp1那一行,印出第二個列的2-4個字  
  6. systemp =`/usr/bin/sensors | grep temp2 |awk '{print $2}'|cut -c 2-5` 不用解釋了吧  
  7. echo $cputemp  
  8. echo $systemp  
  9. # the uptime  
  10. uptime | sed 's:^.* up \(.*\), [0-9][0-9]* users.*$:\1:'  
  11. # my name  
  12. uname -n 
  1. [root@securitycn ~]# chmod +x temp.sh 改成可執(zhí)行  
  2. [root@securitycn ~]# ./temp.sh 試試看有沒有問題  
  3. 39  
  4. 33.5  
  5. 15:36:19 up 22:28, 1 user, load average: 0.04, 0.09, 0.04  
  6. securitycn 

CentOS sensors再來寫下面的文件

  1. [root@securitycn ~]# cd ../etc/  
  2. [root@securitycn ~]# vi temp.cfg  
  1. WorkDir: /data1/usr/apache/htdocs/mrtg/temp/  
  2. Target[index]: `/usr/local/mrtg/bin/temp.sh`  
  3. MaxBytes[index]:80  
  4. Options[index]: gauge, nopercent, growright  
  5. YLegend[index]: Temp (度)  
  6. ShortLegend[index]: 度  
  7. LegendO[index]: 系統(tǒng)溫度;  
  8. LegendI[index]: CPU溫度;  
  9. Title[index]: 系統(tǒng)溫度表  
  10. PageTop[index]: <H1>主機(jī)溫度表</H1> 

[root@securitycn ~]# /usr/local/mrtg/bin/mrtg /usr/local/mrtg/etc/temp.cfg執(zhí)行3次就不報錯了然后加入到crontab里面*/5 * * * * /usr/local/mrtg/bin/mrtg /usr/local/mrtg/etc/temp.cfgPageTop[index]: <H1>主機(jī)溫度表

【編輯推薦】

  1. CentOS FastCGI***化性能揮其性能優(yōu)勢
  2. CentOS RoR應(yīng)用性能優(yōu)化的實戰(zhàn)經(jīng)驗
  3. CentOS WEB緩存服務(wù)器程序使用比較靈活
  4. CentOS Oracle測試運(yùn)行使用root用戶修改
  5. CentOS NTFS安裝和配置支持所有符合POSIX標(biāo)準(zhǔn)的磁盤操作
責(zé)任編輯:佚名 來源: csdn
相關(guān)推薦

2022-03-02 00:06:36

數(shù)據(jù)勒索軟件惡意軟件

2023-08-28 06:56:16

主板CPU攢機(jī)

2010-04-06 09:22:23

CentOS系統(tǒng)

2011-04-15 09:47:10

CentOSCPU

2011-03-31 09:02:22

MRTG監(jiān)控CPU

2020-11-25 08:13:33

CPU主板GPU

2011-03-31 11:14:29

MRTG監(jiān)測

2009-09-18 13:28:41

Mobile Sens

2022-06-20 05:18:29

服務(wù)器CPU

2011-04-01 15:50:55

ZABBIX監(jiān)控

2011-03-30 10:07:05

Zabbix監(jiān)控

2011-10-10 10:15:54

英特爾主板CPU

2010-05-26 18:08:30

Linux性能監(jiān)控

2011-03-24 10:19:58

SQL Server2CPU性能監(jiān)控

2010-12-24 13:25:44

Linux性能監(jiān)控CPU

2019-06-03 20:00:09

LinuxCPU溫度GPU溫度

2011-09-06 10:23:33

2010-01-14 17:23:29

CentOS Orac

2021-03-01 18:33:26

CPU內(nèi)存主板

2013-04-24 15:25:05

CentOStop命令CPU負(fù)載
點贊
收藏

51CTO技術(shù)棧公眾號

主站蜘蛛池模板: 免费在线看黄 | 日韩国产精品一区二区三区 | 亚洲精品一区在线观看 | 1000部精品久久久久久久久 | 欧美精品乱码久久久久久按摩 | 亚洲欧美日韩电影 | 国产精品高潮呻吟久久 | 欧美成年人视频在线观看 | 国产资源一区二区三区 | 97精品国产97久久久久久免费 | 一区二区三区中文字幕 | 日韩欧美国产一区二区 | 一级h片| 国产视频一二三区 | 久久另类视频 | 欧美日韩三级 | 亚洲欧美日韩中文在线 | 久久99久久99久久 | 日本又色又爽又黄又高潮 | 福利视频大全 | 日韩欧美在线不卡 | 亚洲精品福利在线 | 一区二区国产在线 | 日本在线中文 | 国产精品99久久久久久动医院 | 亚洲天堂av在线 | 国产精品69毛片高清亚洲 | 亚洲成人久久久 | 日韩在线高清 | 精品日韩一区 | 久久久99精品免费观看 | 成人午夜网站 | 中文一区| 欧美日韩在线一区 | 91观看 | 国产精品一二三区在线观看 | 在线日韩欧美 | 国产成人精品一区二区 | 97狠狠干| 91精品中文字幕一区二区三区 | 成人在线一区二区三区 |