コマンドは次の通り。
$ sudo smartctl -iA /dev/sda
最後の/dev/sdaは各々の環境に合ったものに置き換えてちょうだい。
-iAのそれぞれの意味。
-i, --info
Show identity information for device
-A, --attributes
Show device SMART vendor-specific Attributes and values
ちなみにsmartctlはdebianならsmartmontoolsパッケージに含まれている。
半角英数のみの書き込みだからって蹴られたorz
可動日数が一番古いの。
$ sudo smartctl -iA /dev/sda
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.0.0-2-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Deskstar T7K500
Device Model: Hitachi HDT725032VLA360
Serial Number: VFD200R2DALDRL
LU WWN Device Id: 5 000cca 211d2e853
Firmware Version: V54OA73A
User Capacity: 320,072,933,376 bytes [320 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA/ATAPI-7 T13/1532D revision 1
Local Time is: Sun Aug 30 04:40:05 2015 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== 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 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 112 112 024 Pre-fail Always - 335 (Average 333)
4 Start_Stop_Count 0x0012 099 099 000 Old_age Always - 4033
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 020 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 095 095 000 Old_age Always - 41642
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 4033
192 Power-Off_Retract_Count 0x0032 096 096 000 Old_age Always - 5804
193 Load_Cycle_Count 0x0012 096 096 000 Old_age Always - 5804
194 Temperature_Celsius 0x0002 193 193 000 Old_age Always - 31 (Min/Max 4/45)
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 253 000 Old_age Always - 0
連続した半角スペースが詰まっちゃって見難いorz
smart値がなんなのか知らなかった
sedで半角スペースふたつを全角スペースに置き換えてみた。
$ sudo smartctl -iA /dev/sda|sed 's/ / /g'
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.0.0-2-amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi Deskstar T7K500
Device Model: Hitachi HDT725032VLA360
Serial Number: VFD200R2DALDRL
LU WWN Device Id: 5 000cca 211d2e853
Firmware Version: V54OA73A
User Capacity: 320,072,933,376 bytes [320 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA/ATAPI-7 T13/1532D revision 1
Local Time is: Sun Sep 6 06:12:18 2015 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== 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 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 111 111 024 Pre-fail Always - 335 (Average 335)
4 Start_Stop_Count 0x0012 099 099 000 Old_age Always - 4041
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 020 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 095 095 000 Old_age Always - 41687
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 4041
192 Power-Off_Retract_Count 0x0032 096 096 000 Old_age Always - 5814
193 Load_Cycle_Count 0x0012 096 096 000 Old_age Always - 5814
194 Temperature_Celsius 0x0002 176 176 000 Old_age Always - 34 (Min/Max 4/45)
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 253 000 Old_age Always - 0
固定幅フォントを使うように指定しないとまだ微妙だけど、ひとまずこんなところか。
昨年購入した粉飾決算HDD
$ sudo smartctl -iA /dev/sda|sed 's/ / /g'
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.5.0-2-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Toshiba 3.5" DT01ACA... Desktop HDD
Device Model: TOSHIBA DT01ACA300
Serial Number: 55852VWGS
LU WWN Device Id: 5 000039 fe3c2509e
Firmware Version: MX6OABB0
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Jun 6 10:35:42 2016 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== 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 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 139 139 054 Pre-fail Offline - 70
3 Spin_Up_Time 0x0007 134 134 024 Pre-fail Always - 428 (Average 427)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 273
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 126 126 020 Pre-fail Offline - 32
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 3939
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 273
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 273
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always -
(略)
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
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 115 100 034 Pre-fail Always - 94652536
3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 71
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 066 060 030 Pre-fail Always - 4299231898
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 349
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 70
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 4295032833
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 065 054 045 Old_age Always - 35 (Min/Max 30/43)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 19
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 4
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 376
194 Temperature_Celsius 0x0022 035 046 000 Old_age Always - 35 (0 13 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always - 0