読者です 読者をやめる 読者になる 読者になる

Windowsでsmartmontools

http://www.bnote.net/windows/windows/win_smartmontools.shtml を参考にする。

smartctl -t short /dev/hdb

smartmontools-5.33-1.win32ではselftestのログ取得でエラーになった。

>smartctl -l selftest /dev/hdb
smartctl version 5.33 [i386-pc-mingw32] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
Error SMART Error Self-Test Log Read failed: Input/output error
Smartctl: SMART Self Test Log Read Failed

svnスナップショットビルドを取得
http://smartmontools-win32.dyndns.org/smartmontools/
smartmontools-5.40-0-20100501-r3100.win64を使ってみる。

>smartctl -l selftest /dev/hdb
smartctl 5.40 2010-04-30 r3100 [x86_64-w64-mingw32-win7] (cf-win32-20100501)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%        86         -

selftestを未実行の場合は以下のようになった。

>smartctl -l selftest /dev/hdc
smartctl 5.40 2010-04-30 r3100 [x86_64-w64-mingw32-win7] (cf-win32-20100501)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

ロングセルフテストと、所要時間の取得

smartctl -t long /dev/hdb
...
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 255 minutes for test to complete.
Test will complete after Tue Jun 01 20:42:53 2010

テストが終了すれば、 smartctl -l selftest /dev/hdb で結果を取得できるはず。