LinuxでCPU温度を表示

用意したもの(TL8Wの場合)
(TL10D2Fの場合はこちら
lm_sensors-devel-2.6.2-1

lm_sensors-2.6.2-1

※上の2つはTurbo Lnux 8 Workstationでは標準インストール
gkrellm-1.2.13-1.i386.rpm



設定関連
$ su -
# /usr/sbin/sensors-detect
.
.(途中略)
.
 Some chips are also accessible through the ISA bus. ISA probes are
 typically a bit more dangerous, as we have to write to I/O ports to do
 this.  Do you want to scan the ISA bus? (YES/no): 
Probing for `National Semiconductor LM78'
  Trying address 0x0290... Success!
    (confidence 7, driver `lm78')
Probing for `National Semiconductor LM78-J'
  Trying address 0x0290... Failed!
Probing for `National Semiconductor LM79'
  Trying address 0x0290... Failed!
Probing for `Winbond W83781D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83782D'
  Trying address 0x0290... Failed!
Probing for `Winbond W83627HF'
  Trying address 0x0290... Failed!
Probing for `Winbond W83697HF'
  Trying address 0x0290... Failed!
Probing for `Silicon Integrated Systems SIS5595'
  Trying general detect... Failed!
Probing for `VIA Technologies VT 82C686 Integrated Sensors'
  Trying general detect... Failed!
Probing for `ITE IT8705F / IT8712F / SiS 950'
  Trying address 0x0290... Success!
    (confidence 7, driver `it87')

 Now follows a summary of the probes I have just done.
 Just press ENTER to continue: 

Driver `lm78' (should be inserted):
  Detects correctly:
  * ISA bus address 0x0290 (Busdriver `i2c-isa')
    Chip `National Semiconductor LM78' (confidence: 7)

Driver `it87' (may not be inserted):
  Misdetects:
  * ISA bus address 0x0290 (Busdriver `i2c-isa')
    Chip `ITE IT8705F / IT8712F / SiS 950' (confidence: 7)
.
 I will now generate the commands needed to load the I2C modules.
 Sometimes, a chip is available both through the ISA bus and an I2C bus.
 ISA bus access is faster, but you need to load an additional driver module
 for it. If you have the choice, do you want to use the ISA bus or the
 I2C/SMBus (ISA/smbus)? 

WARNING! If you have some things built into your kernel, the 
below list will contain too many modules. Skip the appropriate ones!
To load everything that is needed, add this to some /etc/rc* file:

#----cut here----
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe lm78
#----cut here----

To make the sensors modules behave correctly, add these lines to either
/etc/modules.conf or /etc/conf.modules:

#----cut here----
# I2C module options
alias char-major-89 i2c-dev
#----cut here----

#
表示されたように、/etc/rc.localと/etc/modules.confに追加しておく。
そして再起動し、
$ sensors
lm78-isa-0290
Adapter: ISA adapter
Algorithm: ISA algorithm
VCore 1:   +0.00 V  (min =  +0.00 V, max =  +1.31 V)   ALARM
VCore 2:   +0.00 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
+3.3V:     +0.00 V  (min =  +2.97 V, max =  +0.00 V)   ALARM
+5V:       +0.00 V  (min =  +4.50 V, max =  +5.48 V)   ALARM
+12V:      +0.00 V  (min = +10.79 V, max = +13.11 V)   ALARM
-12V:      -0.00 V  (min = -10.78 V, max = -13.18 V)   ALARM
-5V:       -0.00 V  (min =  -4.50 V, max =  -5.48 V)   ALARM
fan1:       -1 RPM  (min = 6000 RPM, div = 1)          ALARM
fan2:     25000 RPM  (min = 6000 RPM, div = 1)          
fan3:     10227 RPM  (min = 3000 RPM, div = 2)          ALARM
temp:       +0.0庵  (limit =  +60庵, hysteresis =  +50庵) ALARM
vid:      +3.50 V
alarms:   Board temperature input (usually LM75 chips) ALARM
alarms:   Chassis intrusion detection                  ALARM
$
どうもおかしいので、/etc/rc.localの内容を変更する。
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe it87
これでもう一度、
$ sensors
it87-isa-0290
Adapter: ISA adapter
Algorithm: ISA algorithm
VCore 1:   +1.71 V  (min =  +1.53 V, max =  +1.87 V)   
VCore 2:   +1.23 V  (min =  +2.25 V, max =  +2.75 V)   ALARM
+3.3V:     +5.98 V  (min =  +2.96 V, max =  +3.60 V)   ALARM
+5V:       +4.86 V  (min =  +4.50 V, max =  +5.48 V)   
+12V:     +11.88 V  (min = +11.36 V, max = +13.80 V)   
-12V:     -13.63 V  (min = -15.86 V, max = -13.40 V)   
-5V:       -9.48 V  (min = -10.13 V, max =  -9.44 V)   
Stdby:     +4.97 V  (min =  +4.50 V, max =  +5.48 V)   
in8:       +0.00 V
fan1:     4591 RPM  (min = 3000 RPM, div = 2)          
fan2:        0 RPM  (min = 3000 RPM, div = 2)          ALARM
Temp1/MB:    +54庵  (min =  +20庵, max =  +60庵) 
Temp2/CPU:  -114庵  (min =  +20庵, max =  +60庵) 
$
CPU温度がどうもおかしいので、/etc/sensors.confのit87-*に書かれてる オプションを、さらに/etc/rc.localに追加する。
# I2C adapter drivers
modprobe i2c-isa
# I2C chip drivers
modprobe it87 temp_type=0x31
これでもう一度、
$ sensors
it87-isa-0290
Adapter: ISA adapter
Algorithm: ISA algorithm
VCore 1:   +1.71 V  (min =  +1.53 V, max =  +1.87 V)   
VCore 2:   +1.23 V  (min =  +2.25 V, max =  +2.75 V)   ALARM
+3.3V:     +5.98 V  (min =  +2.96 V, max =  +3.60 V)   ALARM
+5V:       +4.89 V  (min =  +4.50 V, max =  +5.48 V)   
+12V:     +11.84 V  (min = +11.36 V, max = +13.80 V)   
-12V:     -14.17 V  (min = -15.86 V, max = -13.40 V)   
-5V:       -6.80 V  (min = -10.13 V, max =  -9.44 V)   ALARM
Stdby:     +4.94 V  (min =  +4.50 V, max =  +5.48 V)   
in8:       +0.00 V
fan1:     4591 RPM  (min = 3000 RPM, div = 2)          
fan2:        0 RPM  (min = 3000 RPM, div = 2)          ALARM
Temp1/MB:    +68庵  (min =  +20庵, max =  +60庵) 
Temp2/CPU:   +66庵  (min =  +20庵, max =  +60庵) 
$
℃が文字化けしてるが、気にせずにgkrellm-1.2.13-1.i386.rpmをインストー ルし、実行する。
※BIOSでのM/B温度は54℃なので×0.8、+3.3Vは2.99なので÷2に変更しないと、 数値がおかしい
$ LC_ALL=C gkrellm &
$

画面上を右クリックして「Configurarion」を表示させ、 「Proc」の「Draw fan and temperature...」をチェックし、 「Sensors」の空欄になっている、「temp1」と「temp2」と「fan1」に 「M/B」「CPU」「FAN」とでも入れれば、温度と回転数が表示される。
その他は、お好みで...
※M/B温度は×0.8、+3.3Vは÷2に変更しないと、数値がおかしいので、 この画面で調整をした。


Last modified: Mon Sep 11 21:55:57 JST 2006
戻る