Category
- 1/43 Car's (246)
- Bouldering (14)
- Camera (32)
- Computer (41)
- Everyday (134)
- Goods (12)
- Linux (49)
- Music (32)
- Photo (65)
- Plant (33)
- Plastic Model (58)
- Trekking (43)
- WordPress (35)
It's blog written about Trekking ,1/43 MiniCar , Plastic Model , Photo , Computing.
RSS自宅サーバーのCPU温度を監視する為、lm_sensorsを導入しています。
自宅サーバーは当初 kernel 2.6.29 で動作していたのだが、
Aopen BB10 Silverは、Fintek F71858DG Super IO Sensorを
搭載しており、lm_sensorsのサポートリストを見ると、
kernel 2.6.31 以降じゃないと動かないらしい。
「う~ん、kernelの再構築は面倒くさいしなぁ…
CPU放熱板は手でを触れる温度だし、今の所動いてるし…」
と言うことで、lm_sensorsの導入はくじけました。
しかし、パッケージのアップデートでkernelのバージョンが
上がったので(現在は2.6.32)lm_sensorsを導入しました。
lm_sensorsのrpmパッケージをインストール
#yum install lm_sensors
…インストール中画面…
sensors-detectでセンサーを検出させてコンフィグを作成する。
途中はすべてYesを答えました。
#sensors-detect
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 10h thermal sensors… No
AMD Family 11h thermal sensors… No
Intel Core family thermal sensor… No
Intel Atom thermal sensor… Success!
(driver coretemp')
Intel AMB FB-DIMM 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):
Probing for Super-I/O at 0x2e/0x2f
Trying family National Semiconductor’… No
Trying family SMSC'... No
VIA/Winbond/Nuvoton/Fintek’… No
Trying family
Trying family ITE'... No
National Semiconductor’… No
Probing for Super-I/O at 0x4e/0x4f
Trying family
Trying family SMSC'... No
VIA/Winbond/Nuvoton/Fintek’… Yes
Trying family
Found Fintek F71858DG Super IO Sensors' Success!
f71882fg’)
(address 0x295, driver
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):
Probing for IPMI BMC KCS' at 0xca0... No
IPMI BMC SMIC’ at 0xca8… No
Probing for
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):
Using driver i2c-i801' for device 0000:00:1f.3: Intel 82801G ICH7
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
Module i2c-dev loaded successfully.
Next adapter: intel drm CRTDDC_A (i2c-0)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x49
Probing for National Semiconductor LM75’… No
Probing for Dallas Semiconductor DS75'... No
National Semiconductor LM77’… No
Probing for
Probing for Dallas Semiconductor DS1621/DS1631'... No
National Semiconductor LM73’… No
Probing for
Probing for National Semiconductor LM92'... No
National Semiconductor LM76’… No
Probing for
Probing for Maxim MAX6633/MAX6634/MAX6635'... No
Analog Devices ADM1033’… No
Client found at address 0x50
Probing for
Probing for Analog Devices ADM1034'... No
SPD EEPROM’… No
Probing for
Probing for EDID EEPROM'... Yes
(confidence 8, not a hardware monitoring chip)
Next adapter: SMBus I801 adapter at 0500 (i2c-1)
Do you want to scan it? (yes/NO/selectively):
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver coretemp’:
* Chip Intel Atom thermal sensor' (confidence: 9)
Driver f71882fg’:
* ISA bus, address 0x295
Chip `Fintek F71858DG Super IO Sensors’ (confidence: 9)
Starting lm_sensors: loading module coretemp f71882fg [ OK ]
Unloading i2c-dev… OK
認識出来て、デーモンが動いた様です。
sensorsコマンドで早速測ってみました。
#sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +40.0°C (crit = +75.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +22.0°C (crit = +90.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +16.0°C (crit = +90.0°C)
coretemp-isa-0002
Adapter: ISA adapter
Core 2: +16.0°C (crit = +90.0°C)
coretemp-isa-0003
Adapter: ISA adapter
Core 3: +22.0°C (crit = +90.0°C)
40℃ですから、まずまずですね。
次はhddtempを導入します。
これも簡単にrpmパッケージでインストールして計測してみます。
# yum install hddtemp
…インストール中画面…
# hddtemp /dev/sda
/dev/sda: Hitachi HTS545032B9A300: 39°C
39℃ですから、いいんじゃないですかね。
GUIで見たいなら、gnome-applet-sensorsを入れたり、
グラフかしたいならMRTGを入れるのも良いでしょう。
私は、規定温度を越えたらメール通知するスクリプトを作ってcronで監視してます。
1 |
<温度異常を監視してメールするスクリプト> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<span style="color: #ffffff;">#!/bin/bash date > templog.txt TEMP1=`sensors | grep temp1 | cut -d "+" -f 2 | cut -c1-2` if [ $TEMP1 -ge 60 ]; then sensors >> templog.txt cat templog.txt | mail -s "`hostname` CPU Temp Over!!" root fi date > templog.txt TEMP2=`hddtemp /dev/sda | cut -d " " -f 4 | cut -c1-2` if [ $TEMP2 -ge 50 ]; then hddtemp /dev/sda >> templog.txt cat templog.txt | mail -s "`hostname` HDD Temp Over!!" root fi</span> |
監視するデバイスや温度はベタ書きしてます。
(もっと綺麗に書けないのか!)