VineLinux4.x/サーバ管理/Muninで温度監視 のバックアップの現在との差分(No.1)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
* HDDの温度監視 [#lc171ce0]
* HDDの温度監視 [#w230a2ba]

smartmontoolsのインストール。

 # apt-get install smartmontools
 パッケージリストを読みこんでいます... 完了
 依存情報ツリーを作成しています... 完了
 以下のパッケージが新たにインストールされます:
   smartmontools
 アップグレード: 0 個, 新規インストール: 1 個, 削除: 0 個, 保留: 0 個
 419kB のアーカイブを取得する必要があります。
 展開後に 779kB のディスク容量が追加消費されます。
 取得:1 http://updates.vinelinux.org 4.2/i386/plus smartmontools 5.38-1vl4 [419kB]
 419kB を 0s 秒で取得しました (640kB/s)
 変更を適用しています...
 準備中...                   ########################################### [100%]
 Note that you can use a configuration file /etc/smartd.conf to control the
 startup behavior of the smartd daemon.  See man 8 smartd for details.
 Run "/sbin/chkconfig --add smartd", to start smartd service on system boot
    1:smartmontools          ########################################### [100%]
 Run "/etc/rc.d/init.d/smartd start" to start smartd service now.
 完了

smartdの起動。
 # /etc/init.d/smartd start
 Starting smartd:                                           [  OK  ]

自動起動の設定。
 # chkconfig smartd on
 # chkconfig --list smartd
 smartd          0:off   1:off   2:off   3:on    4:on    5:on    6:off

/dev/hdaの情報を表示
/dev/hdaの情報を表示。
 # smartctl -a /dev/hda
 smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
 Home page is http://smartmontools.sourceforge.net/
 
 === START OF INFORMATION SECTION ===
 Model Family:     Hitachi Travelstar 5K100 series
 Device Model:     HTS541040G9AT00
 Serial Number:    MPB210X2G0BLJB
 Firmware Version: MB2OA56J
 User Capacity:    40,007,761,920 bytes
 Device is:        In smartctl database [for details use: -P show]
 ATA Version is:   6
 ATA Standard is:  ATA/ATAPI-6 T13 1410D revision 3a
 Local Time is:    Sat Nov 29 11:10:27 2008 JST
 SMART support is: Available - device has SMART capability.
 SMART support is: Enabled
 :

 :
 SMART Attributes Data Structure revision number: 16
 Vendor Specific SMART Attributes with Thresholds:
 ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
   1 Raw_Read_Error_Rate     0x000b   100   100   062    Pre-fail  Always       -       0
   2 Throughput_Performance  0x0005   100   100   040    Pre-fail  Offline      -       0
   3 Spin_Up_Time            0x0007   188   188   033    Pre-fail  Always       -       1
   4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       126
   5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
   7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0
   8 Seek_Time_Performance   0x0005   100   100   040    Pre-fail  Offline      -       0
   9 Power_On_Hours          0x0012   031   031   000    Old_age   Always       -       30503
  10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
  12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       112
 191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
 192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       10
 193 Load_Cycle_Count        0x0012   001   001   000    Old_age   Always       -       5051923
 194 Temperature_Celsius     0x0002   166   166   000    Old_age   Always       -       33 (Lifetime Min/Max 15/56)
 196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
 197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
 198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
 199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0
  :
  :

>194 Temperature_Celsius・・・が表示されればOKです。右側の33という数字が現在の温度です。




シンボリックリンク作成。
 # ln -s /usr/share/munin/plugins/hddtemp_smartctl /etc/munin/plugins/hddtemp_smartctl

設定ファイル変更。
 # vi plugin-conf.d/munin-node
 # vi /etc/munin/plugin-conf.d/munin-node
>
 [hddtemp_smartctl]
 user root
 env.drives hda
 env.args_hda --all -d ata
>hdaは環境によって適宜変更する。

munin-nodeの再起動。
 # /etc/init.d/munin-node restart
 Stopping Munin Node agents:                                [  OK  ]
 Starting Munin Node:                                       [  OK  ]


*CPUの温度監視(ACPI対応パソコンの場合) [#ud1803c4]
*CPUの温度監視(ACPI対応パソコンの場合) [#uecd654a]

VineSeedより、acpiをダウンロード。
Vine Seedより、acpi-0.09-1vl5.src.rpmをダウンロード。
>注:Vine Seedには、ビルド済みrpmも用意されていますが、自分の環境では「浮動小数点演算例外です」と表示され実行できなかったため、SRPMよりビルドしています。

 # cd /usr/src/vine/SRPMS/
 # wget http://www.ring.gr.jp/pub/linux/Vine/VineSeed/SRPMS.plus/acpi-0.09-
 1vl5.src.rpm
 --12:54:09--  http://www.ring.gr.jp/pub/linux/Vine/VineSeed/SRPMS.plus/acpi-0.09-1vl5.src.rpm
            => `acpi-0.09-1vl5.src.rpm'
 www.ring.gr.jp をDNSに問いあわせています... 192.218.230.58, 160.26.2.178, 150.26.214.84, ...
 www.ring.gr.jp|192.218.230.58|:80 に接続しています... 接続しました。
 HTTP による接続要求を送信しました、応答を待っています... 200 OK
 長さ: 88,204 (86K) [application/x-wais-source]
 
 100%[==============================================>] 88,204       490.72K/s
 
 12:54:09 (488.16 KB/s) - `acpi-0.09-1vl5.src.rpm' を保存しました [88204/88204]
 # wget http://www.ring.gr.jp/pub/linux/Vine/VineSeed/SRPMS.plus/acpi-0.09-1vl5.src.rpm

ビルド。
 # rpmbuild --rebuild acpi-0.09-1vl5.src.rpm

インストール。
 # cd ../RPMS/i386/
 # rpm -Uvh acpi-0.09-1vl4.i386.rpm
 準備中...                   ########################################### [100%]
    1:acpi                   ########################################### [100%]

acpiコマンドにて値が取得できるか確認。
 # acpi -t
      Battery 1: charged, 99%
      Thermal 1: ok, 42.0 degrees C
Thermal 1: ok, 42.0 degrees C はCPUの温度。
>↑42.0 degrees C はCPUの温度。

シンボリックリンク作成。
 # ln -s /usr/share/munin/plugins/acpi /etc/munin/plugins/acpi

munin-nodeの再起動。
 # /etc/init.d/munin-node restart
 Stopping Munin Node agents:                                [  OK  ]
 Starting Munin Node:                                       [  OK  ]


ページを確認して正常に表示されていればOK。
#ref(sensors.png,nolink)


* コメント [#l88386d9]
#comment