Squeeze のインストール(15)ファンコントロール

Debian LS-CL LS-QL LS-VL LS-XHL

手持ちの一通りの機種で 次期 Debian である Squeeze ベースのハックキットが 動作し始めた。
再確認してリリースを、、、と思っていたのだが、、、

LS-AVL で温度取得によるファンコントロールが復活しているのを 忘れていた。
ハックキットでも同じようにファンコントロールができないか、 ちょっと調べてみる。

LS-VL で確認

まずは、LS-VL から。何するにしても速いし。

smartctl のインストール

パッケージを探す

どのパッケージをインストールすれば良いの?
root@vl:~# apt-cache search smartctl
gsmartcontrol - graphical user interface for smartctl
smartmontools - control and monitor storage systems using S.M.A.R.T.
root@vl:~#

smartmontools のインストール

root@vl:~# apt-get install smartmontools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user gsmartcontrol smart-notifier
Recommended packages:
  mailx mailutils
The following NEW packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 smartmontools
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1348 kB of archives.
After this operation, 3351 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libkeyutils1 armel 1.4-1 [6406 B]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5support0 armel 1.8.3+dfsg-4 [43.0 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libk5crypto3 armel 1.8.3+dfsg-4 [108 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5-3 armel 1.8.3+dfsg-4 [332 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main libgssapi-krb5-2 armel 1.8.3+dfsg-4 [118 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main heirloom-mailx armel 12.4-2 [302 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main libcap-ng0 armel 0.6.4-1 [11.7 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main smartmontools armel 5.39.1+svn3124-1 [427 kB]
Fetched 1348 kB in 0s (1398 kB/s)
Selecting previously deselected package libkeyutils1.
(Reading database ... 10666 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.4-1_armel.deb) ...
Selecting previously deselected package libkrb5support0.
Unpacking libkrb5support0 (from .../libkrb5support0_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libk5crypto3.
Unpacking libk5crypto3 (from .../libk5crypto3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libkrb5-3.
Unpacking libkrb5-3 (from .../libkrb5-3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libgssapi-krb5-2.
Unpacking libgssapi-krb5-2 (from .../libgssapi-krb5-2_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.4-2_armel.deb) ...
Selecting previously deselected package libcap-ng0.
Unpacking libcap-ng0 (from .../libcap-ng0_0.6.4-1_armel.deb) ...
Selecting previously deselected package smartmontools.
Unpacking smartmontools (from .../smartmontools_5.39.1+svn3124-1_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.4-1) ...
Setting up libkrb5support0 (1.8.3+dfsg-4) ...
Setting up libk5crypto3 (1.8.3+dfsg-4) ...
Setting up libkrb5-3 (1.8.3+dfsg-4) ...
Setting up libgssapi-krb5-2 (1.8.3+dfsg-4) ...
Setting up heirloom-mailx (12.4-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Setting up libcap-ng0 (0.6.4-1) ...
Setting up smartmontools (5.39.1+svn3124-1) ...
!root@vl:~#

温度が測れることの確認

root@vl:~# smartctl -A -d marvell /dev/sda
smartctl 5.40 2010-07-12 r3124 [armv5tel-unknown-linux-gnueabi] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
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     0x000f   253   100   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0007   100   100   025    Pre-fail  Always       -       6464
  4 Start_Stop_Count        0x0032   091   091   000    Old_age   Always       -       9257
  5 Reallocated_Sector_Ct   0x0033   099   099   010    Pre-fail  Always       -       10
  7 Seek_Error_Rate         0x000f   253   253   051    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   253   253   015    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       24831
 10 Spin_Retry_Count        0x0033   253   253   051    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x0012   253   002   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       52
190 Airflow_Temperature_Cel 0x0022   175   106   000    Old_age   Always       -       21
194 Temperature_Celsius     0x0022   175   106   000    Old_age   Always       -       21
195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       244281
196 Reallocated_Event_Count 0x0032   099   099   000    Old_age   Always       -       10
197 Current_Pending_Sector  0x0012   253   253   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   253   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x000a   253   100   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x000a   253   100   000    Old_age   Always       -       0
202 Data_Address_Mark_Errs  0x0032   253   253   000    Old_age   Always       -       0

root@vl:~#
行頭が 194 の行の RAW_VALUEは、21℃? ちょっと低いように思えるけど、、、
しばらくして再実行すると、、、
root@vl:~# smartctl -A -d marvell /dev/sda
smartctl 5.40 2010-07-12 r3124 [armv5tel-unknown-linux-gnueabi] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
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     0x000f   253   100   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0007   100   100   025    Pre-fail  Always       -       6464
  4 Start_Stop_Count        0x0032   091   091   000    Old_age   Always       -       9257
  5 Reallocated_Sector_Ct   0x0033   099   099   010    Pre-fail  Always       -       10
  7 Seek_Error_Rate         0x000f   253   253   051    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   253   253   015    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       24831
 10 Spin_Retry_Count        0x0033   253   253   051    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x0012   253   002   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       52
190 Airflow_Temperature_Cel 0x0022   172   106   000    Old_age   Always       -       22
194 Temperature_Celsius     0x0022   172   106   000    Old_age   Always       -       22
195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       244281
196 Reallocated_Event_Count 0x0032   099   099   000    Old_age   Always       -       10
197 Current_Pending_Sector  0x0012   253   253   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   253   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x000a   253   100   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x000a   253   100   000    Old_age   Always       -       0
202 Data_Address_Mark_Errs  0x0032   253   253   000    Old_age   Always       -       0

root@vl:~#
行頭が 194 の行の RAW_VALUEは、22℃。変化していることは変化している。

LS-QL で確認

続いては、LS-QL。

smartmontools のインストール

root@qube:~# apt-get install smartmontools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user gsmartcontrol smart-notifier
Recommended packages:
  mailx mailutils
The following NEW packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1
  libkrb5-3 libkrb5support0 smartmontools
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1348 kB of archives.
After this operation, 3351 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libkeyutils1 armel 1.4-1 [6406 B]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5support0 armel 1.8.3+dfsg-4 [43.0 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libk5crypto3 armel 1.8.3+dfsg-4 [108 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5-3 armel 1.8.3+dfsg-4 [332 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main libgssapi-krb5-2 armel 1.8.3+dfsg-4 [118 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main heirloom-mailx armel 12.4-2 [302 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main libcap-ng0 armel 0.6.4-1 [11.7 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main smartmontools armel 5.39.1+svn3124-1 [427 kB]
Fetched 1348 kB in 1s (1079 kB/s)
Selecting previously deselected package libkeyutils1.
(Reading database ... 10666 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.4-1_armel.deb) ...
Selecting previously deselected package libkrb5support0.
Unpacking libkrb5support0 (from .../libkrb5support0_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libk5crypto3.
Unpacking libk5crypto3 (from .../libk5crypto3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libkrb5-3.
Unpacking libkrb5-3 (from .../libkrb5-3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libgssapi-krb5-2.
Unpacking libgssapi-krb5-2 (from .../libgssapi-krb5-2_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.4-2_armel.deb) ...
Selecting previously deselected package libcap-ng0.
Unpacking libcap-ng0 (from .../libcap-ng0_0.6.4-1_armel.deb) ...
Selecting previously deselected package smartmontools.
Unpacking smartmontools (from .../smartmontools_5.39.1+svn3124-1_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.4-1) ...
Setting up libkrb5support0 (1.8.3+dfsg-4) ...
Setting up libk5crypto3 (1.8.3+dfsg-4) ...
Setting up libkrb5-3 (1.8.3+dfsg-4) ...
Setting up libgssapi-krb5-2 (1.8.3+dfsg-4) ...
Setting up heirloom-mailx (12.4-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Setting up libcap-ng0 (0.6.4-1) ...
Setting up smartmontools (5.39.1+svn3124-1) ...
root@qube:~#

温度が測れることの確認

root@qube:~# smartctl -A -d marvell /dev/sda
smartctl 5.40 20program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
10-07-12 r3124 [armv5tel-unknown-linux-gnueabi] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 32
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  3 Spin_Up_Time            0x0027   184   180   063    Pre-fail  Always       -       23643
  4 Start_Stop_Count        0x0032   251   251   000    Old_age   Always       -       4636
  5 Reallocated_Sector_Ct   0x0033   253   253   063    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   253   252   000    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0027   252   238   187    Pre-fail  Always       -       54617
  9 Power_On_Hours          0x0032   233   233   000    Old_age   Always       -       7156
 10 Spin_Retry_Count        0x002b   253   252   157    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x002b   253   252   223    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   253   253   000    Old_age   Always       -       332
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   083   043   000    Old_age   Always       -       17 (Lifetime Min/Max 11/17)
192 Power-Off_Retract_Count 0x0032   253   253   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   253   253   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0032   047   253   000    Old_age   Always       -       17
195 Hardware_ECC_Recovered  0x000a   253   252   000    Old_age   Always       -       538
196 Reallocated_Event_Count 0x0008   253   253   000    Old_age   Offline      -       0
197 Current_Pending_Sector  0x0008   253   253   000    Old_age   Offline      -       0
198 Offline_Uncorrectable   0x0008   253   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0008   199   199   000    Old_age   Offline      -       0
200 Multi_Zone_Error_Rate   0x000a   253   252   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x000a   253   252   000    Old_age   Always       -       0
202 Data_Address_Mark_Errs  0x000a   253   252   000    Old_age   Always       -       0
203 Run_Out_Cancel          0x000b   253   252   180    Pre-fail  Always       -       0
204 Soft_ECC_Correction     0x000a   253   252   000    Old_age   Always       -       0
205 Thermal_Asperity_Rate   0x000a   253   252   000    Old_age   Always       -       0
207 Spin_High_Current       0x002a   253   252   000    Old_age   Always       -       0
208 Spin_Buzz               0x002a   253   252   000    Old_age   Always       -       0
210 Unknown_Attribute       0x0032   253   252   000    Old_age   Always       -       0
211 Unknown_Attribute       0x0032   253   252   000    Old_age   Always       -       0
212 Unknown_Attribute       0x0032   253   248   000    Old_age   Always       -       0

root@qube:~#
行頭が 194 の行の RAW_VALUEは、17℃。 ちょっと低いように思えるけど、、、室温は12℃程だし。。

LS-CL で確認

続いては、LS-CL。

smartmontools のインストール

root@tate:~# apt-get install smartmontools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user gsmartcontrol smart-notifier
Recommended packages:
  mailx mailutils
The following NEW packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 smartmontools
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1348 kB of archives.
After this operation, 3351 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libkeyutils1 armel 1.4-1 [6406 B]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5support0 armel 1.8.3+dfsg-4 [43.0 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libk5crypto3 armel 1.8.3+dfsg-4 [108 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5-3 armel 1.8.3+dfsg-4 [332 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main libgssapi-krb5-2 armel 1.8.3+dfsg-4 [118 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main heirloom-mailx armel 12.4-2 [302 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main libcap-ng0 armel 0.6.4-1 [11.7 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main smartmontools armel 5.39.1+svn3124-1 [427 kB]
Fetched 1348 kB in 0s (1664 kB/s)
Selecting previously deselected package libkeyutils1.
(Reading database ... 10666 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.4-1_armel.deb) ...
Selecting previously deselected package libkrb5support0.
Unpacking libkrb5support0 (from .../libkrb5support0_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libk5crypto3.
Unpacking libk5crypto3 (from .../libk5crypto3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libkrb5-3.
Unpacking libkrb5-3 (from .../libkrb5-3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libgssapi-krb5-2.
Unpacking libgssapi-krb5-2 (from .../libgssapi-krb5-2_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.4-2_armel.deb) ...
Selecting previously deselected package libcap-ng0.
Unpacking libcap-ng0 (from .../libcap-ng0_0.6.4-1_armel.deb) ...
Selecting previously deselected package smartmontools.
Unpacking smartmontools (from .../smartmontools_5.39.1+svn3124-1_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.4-1) ...
Setting up libkrb5support0 (1.8.3+dfsg-4) ...
Setting up libk5crypto3 (1.8.3+dfsg-4) ...
Setting up libkrb5-3 (1.8.3+dfsg-4) ...
Setting up libgssapi-krb5-2 (1.8.3+dfsg-4) ...
Setting up heirloom-mailx (12.4-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Setting up libcap-ng0 (0.6.4-1) ...
Setting up smartmontools (5.39.1+svn3124-1) ...
!root@tate:~#

温度が測れることの確認

root@qube:~# smartctl -A -d marvell /dev/sda
smartctl 5.40 20program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
10-07-12 r3124 [armv5tel-unknown-linux-gnueabi] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 32
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  3 Spin_Up_Time            0x0027   184   180   063    Pre-fail  Always       -       23643
  4 Start_Stop_Count        0x0032   251   251   000    Old_age   Always       -       4636
  5 Reallocated_Sector_Ct   0x0033   253   253   063    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   253   252   000    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0027   252   238   187    Pre-fail  Always       -       54631
  9 Power_On_Hours          0x0032   233   233   000    Old_age   Always       -       7156
 10 Spin_Retry_Count        0x002b   253   252   157    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x002b   253   252   223    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   253   253   000    Old_age   Always       -       332
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   083   043   000    Old_age   Always       -       17 (Lifetime Min/Max 11/17)
192 Power-Off_Retract_Count 0x0032   253   253   000    Old_age   Always       -       0
193 Load_Cycle_Count        0x0032   253   253   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0032   047   253   000    Old_age   Always       -       17
195 Hardware_ECC_Recovered  0x000a   253   252   000    Old_age   Always       -       538
196 Reallocated_Event_Count 0x0008   253   253   000    Old_age   Offline      -       0
197 Current_Pending_Sector  0x0008   253   253   000    Old_age   Offline      -       0
198 Offline_Uncorrectable   0x0008   253   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0008   199   199   000    Old_age   Offline      -       0
200 Multi_Zone_Error_Rate   0x000a   253   252   000    Old_age   Always       -       0
201 Soft_Read_Error_Rate    0x000a   253   252   000    Old_age   Always       -       0
202 Data_Address_Mark_Errs  0x000a   253   252   000    Old_age   Always       -       0
203 Run_Out_Cancel          0x000b   253   252   180    Pre-fail  Always       -       0
204 Soft_ECC_Correction     0x000a   253   252   000    Old_age   Always       -       0
205 Thermal_Asperity_Rate   0x000a   253   252   000    Old_age   Always       -       0
207 Spin_High_Current       0x002a   253   252   000    Old_age   Always       -       0
208 Spin_Buzz               0x002a   253   252   000    Old_age   Always       -       0
210 Unknown_Attribute       0x0032   253   252   000    Old_age   Always       -       0
211 Unknown_Attribute       0x0032   253   252   000    Old_age   Always       -       0
212 Unknown_Attribute       0x0032   253   248   000    Old_age   Always       -       0

root@qube:~#
行頭が 194 の行の RAW_VALUEは、これも17℃。

LS-XHL で確認

最後に LS-XHL。

smartmontools のインストール

root@brick:~# apt-get install smartmontools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user gsmartcontrol smart-notifier
Recommended packages:
  mailx mailutils
The following NEW packages will be installed:
  heirloom-mailx libcap-ng0 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 smartmontools
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1348 kB of archives.
After this operation, 3351 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libkeyutils1 armel 1.4-1 [6406 B]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5support0 armel 1.8.3+dfsg-4 [43.0 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libk5crypto3 armel 1.8.3+dfsg-4 [108 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libkrb5-3 armel 1.8.3+dfsg-4 [332 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main libgssapi-krb5-2 armel 1.8.3+dfsg-4 [118 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main heirloom-mailx armel 12.4-2 [302 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main libcap-ng0 armel 0.6.4-1 [11.7 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main smartmontools armel 5.39.1+svn3124-1 [427 kB]
Fetched 1348 kB in 0s (1477 kB/s)
Selecting previously deselected package libkeyutils1.
(Reading database ... 10666 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.4-1_armel.deb) ...
Selecting previously deselected package libkrb5support0.
Unpacking libkrb5support0 (from .../libkrb5support0_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libk5crypto3.
Unpacking libk5crypto3 (from .../libk5crypto3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libkrb5-3.
Unpacking libkrb5-3 (from .../libkrb5-3_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package libgssapi-krb5-2.
Unpacking libgssapi-krb5-2 (from .../libgssapi-krb5-2_1.8.3+dfsg-4_armel.deb) ...
Selecting previously deselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.4-2_armel.deb) ...
Selecting previously deselected package libcap-ng0.
Unpacking libcap-ng0 (from .../libcap-ng0_0.6.4-1_armel.deb) ...
Selecting previously deselected package smartmontools.
Unpacking smartmontools (from .../smartmontools_5.39.1+svn3124-1_armel.deb) ...
Processing triggers for man-db ...
!Setting up libkeyutils1 (1.4-1) ...
Setting up libkrb5support0 (1.8.3+dfsg-4) ...
Setting up libk5crypto3 (1.8.3+dfsg-4) ...
Setting up libkrb5-3 (1.8.3+dfsg-4) ...
Setting up libgssapi-krb5-2 (1.8.3+dfsg-4) ...
Setting up heirloom-mailx (12.4-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Setting up libcap-ng0 (0.6.4-1) ...
Setting up smartmontools (5.39.1+svn3124-1) ...
!root@brick:~#

温度が測れることの確認

root@brick:~# smartctl -A -d marvell /dev/sda
smartctl 5.40 2010-07-12 r3124 [armv5tel-unknown-linux-gnueabi] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
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     0x000f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0003   187   181   021    Pre-fail  Always       -       3616
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       386
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   200   200   051    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       573
 10 Spin_Retry_Count        0x0013   100   100   051    Pre-fail  Always       -       0
 11 Calibration_Retry_Count 0x0012   100   100   051    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       382
190 Airflow_Temperature_Cel 0x0022   077   032   045    Old_age   Always   In_the_past 23
194 Temperature_Celsius     0x0022   124   079   000    Old_age   Always       -       23
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       1
200 Multi_Zone_Error_Rate   0x0009   200   200   051    Pre-fail  Offline      -       0

root@brick:~#
行頭が 194 の行の RAW_VALUEは、23℃。

手持ちの4台は全部測れた。

ファンコントロールスクリプトの作成

smartctl で取得した温度を元にファンをコントロールする。
root@brick:~# cat /usr/local/sbin/fancontrol
#!/bin/sh
# 3G LinkStation Fancontrol script.
# (C) Copyright Yasunari YAMASHITA 2007-2010. All Rights Reserved.

get_curtemp()
{
        #       # smartctl -A -d marvell /dev/sda
        #       194 Temperature_Celsius     0x0022   116   079   000    Old_age   Always       -       31

        CURTEMP=`smartctl -A -d marvell /dev/sda | sed -n -e 's/^194 .* \([0-9]*\)$/\1/p'`
}
set_fan_speed()
{
        echo $FANSPEED > /proc/buffalo/gpio/fan/control
        echo fan_set_speed $FANSPEED
}

PATH=$PATH:/usr/sbin

# stop -> LOW |- slow -> MID |- fast -> HIGH |- full
HIGH=45
MID=40
LOW=30

if [ -f /etc/fancontrol.conf ]
then
        . /etc/fancontrol.conf
fi

get_curtemp
echo $CURTEMP

if [ $CURTEMP -gt $HIGH ] # full
then
        FANSPEED=full
        set_fan_speed
elif [ $CURTEMP -gt $MID ] # fast
then
        FANSPEED=fast
        set_fan_speed
elif [ $CURTEMP -gt $LOW ] # slow
then
        FANSPEED=slow
        set_fan_speed
else                       # stop
        FANSPEED=stop
        set_fan_speed
fi
root@brick:~#
試しに実行
root@brick:~# sh !$
sh /usr/local/sbin/fancontrol
35
fan_set_speed slow
root@brick:~#
いけてそう

LS-CL
バッファローダイレクト
楽天市場
amazon
LS-XHL
バッファローダイレクト
楽天市場
amazon
ValuMore
LS-QL
バッファローダイレクト
楽天市場
amazon
livedoorデパート
Sofmap
バリューモア
Yahoo!ショッピングトップ
ムラウチドットコム
LS-VL

楽天市場
Amazon


Squeeze のインストール(14)LS-QL でデバッグ
ハックの記録
LinkStation/玄箱 をハックしよう

Squeeze のインストール(16)アーカイブ作成スクリプトの作成

Copyright (C) 2003-2011 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市