3流プログラマのメモ書き

元開発職→社内SE→派遣で営業支援の三流プログラマのIT技術メモ書き。 このメモが忘れっぽい自分とググってきた技術者の役に立ってくれれば幸いです。(jehupc.exblog.jpから移転中)

(Linux)CPUやケース温度、ファン回転数を見たい

熱暴走が疑わしいLinux(CentOS)サーバがあったのでCPU、ケース温度、ファン回転数を測定することにしました。

lm_sensors というパッケージで各種温度の測定が可能なようです。

CentOS5 ではデフォルトは入ってないので yum でインストールしました。

下記コマンドでインストールします。

# yum install lm_sensors

インストール後最初にセンサーを検出しないといけないようです。

下記コマンドでセンサー検出できるようです。いろいろ聞かれますが、とりあえず全部 Yes にします。

[root@localhost ~]# sensors-detect

# sensors-detect revision 5291 (2008-06-23 23:40:46 -0700)

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.

We can start with probing for (PCI) I2C or SMBus adapters.

Do you want to probe now? (YES/no): y

Probing for PCI bus adapters...

Use driver `i2c-i801' for device 0000:00:1f.3: Intel 82801G ICH7

We will now try to load each adapter module in turn.

Module `i2c-i801' already loaded.

If you have undetectable or unsupported I2C/SMBus adapters, you can have

them scanned by manually loading the modules before running this script.

To continue, we need module `i2c-dev' to be loaded.

Do you want to load `i2c-dev' now? (YES/no): y

Module loaded successfully.

We are now going to do the I2C/SMBus adapter probings. Some chips may

be double detected; we choose the one with the highest confidence

value in that case.

If you found that the adapter hung after probing a certain address,

you can specify that address to remain unprobed.

Next adapter: SMBus I801 adapter at 0500 (i2c-0)

Do you want to scan it? (YES/no/selectively): y

Client found at address 0x50

Probing for `Analog Devices ADM1033'... No

Probing for `Analog Devices ADM1034'... No

Probing for `SPD EEPROM'... Yes

(confidence 8, not a hardware monitoring chip)

Probing for `EDID EEPROM'... No

Client found at address 0x52

Probing for `Analog Devices ADM1033'... No

Probing for `Analog Devices ADM1034'... No

Probing for `SPD EEPROM'... Yes

(confidence 8, not a hardware monitoring chip)

Probing for `EDID EEPROM'... No

Some chips are also 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): y

Probing for `National Semiconductor LM78' at 0x290... No

Probing for `National Semiconductor LM78-J' 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

Some Super I/O chips may also contain 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): y

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

Trying family `National Semiconductor'... No

Trying family `SMSC'... No

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

Trying family `ITE'... Yes

Found `ITE IT8718F Super IO Sensors' Success!

(address 0x290, driver `it87')

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

Trying family `National Semiconductor'... No

Trying family `SMSC'... No

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

Trying family `ITE'... No

Some south bridges, CPUs or memory controllers may also contain

embedded sensors. Do you want to scan for them? (YES/no): y

Silicon Integrated Systems SIS5595... No

VIA VT82C686 Integrated Sensors... No

VIA VT8231 Integrated Sensors... No

AMD K8 thermal sensors... No

AMD K10 thermal sensors... No

Intel Core family thermal sensor... Success!

(driver `coretemp')

Intel AMB FB-DIMM thermal sensor... No

Now follows a summary of the probes I have just done.

Just press ENTER to continue:

Driver `it87' (should be inserted):

Detects correctly:

* ISA bus, address 0x290

Chip `ITE IT8718F Super IO Sensors' (confidence: 9)

Driver `coretemp' (should be inserted):

Detects correctly:

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

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): y

lm_sensors を起動中: [ OK ]

後は sensors コマンドを叩くだけです。

こんな感じになります。

[root@localhost ~]# sensors

it8718-isa-0290

Adapter: ISA adapter

in0: +1.15 V (min = +0.00 V, max = +4.08 V)

in1: +1.94 V (min = +0.00 V, max = +4.08 V)

in2: +3.26 V (min = +0.00 V, max = +4.08 V)

in3: +3.02 V (min = +0.00 V, max = +4.08 V)

in4: +0.67 V (min = +0.00 V, max = +2.10 V)

in5: +0.00 V (min = +0.00 V, max = +4.08 V) ALARM

in6: +0.05 V (min = +0.00 V, max = +4.08 V)

in7: +3.07 V (min = +0.00 V, max = +4.08 V)

in8: +3.18 V

fan1: 2142 RPM (min = 0 RPM)

fan2: 3013 RPM (min = 0 RPM)

temp1: -55°C (low = +127°C, high = +127°C) sensor = thermistor

temp2: -2°C (low = +127°C, high = +127°C) sensor = thermistor

temp3: +45°C (low = +127°C, high = +127°C) sensor = diode

vid: +0.000 V

coretemp-isa-0000

Adapter: ISA adapter

Core 0: +50°C (high = +85°C)

coretemp-isa-0001

Adapter: ISA adapter

Core 1: +48°C (high = +85°C)

CPUの温度はコア毎に出るようです。(50℃,48℃ですね。)

temp3 ってのがこのサーバではおそらくケース温度でしょう。

ファンの回転数も出てます。

参考:

@IT:CPUの温度やファンの回転数などをモニタするには

ぷらぷらブログ | lm-sensors システム温度、CPU温度測定

つつみくんのLinux記その57(fedoraサーバー熱暴走) - つつみくんのLinux記