如何通过SMART工具查看硬盘信息及健康状态

如何通过SMART工具查看硬盘信息及健康状态

硬件 Windows计算机,硬盘。 软件 SMART Tool 安装后,在example文件夹(C:\ProgramData\Microsoft\Windows\Start Menu\Programs\smartmontools\smartctl Examples)下有各种使用例子,都以第一个硬盘sda为对象。 控制台中查询命令(CD至C:\Program Files\smartmontools\bin目录):

smartctl --scan //list all hard disk

smartctl -a sda //show sda SMART information

smartctl -H sda //show sda health state (pass or fail)

遇到的问题 有时硬盘无法显示SMART信息,报出error:Smartctl open device: sdc [SAT] failed: \\.\PhysicalDrive2: Open failed, Error=5 这是因为没有Enable SMART,使用命令:smartctl -s on sda // enable SMART 或者需要Run CMD as Administrator reference

SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.

(override with '-T permissive' option)

使用记录:

Microsoft Windows [Version 10.0.18363.900]

(c) 2019 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd C:\Program Files\smartmontools\bin

C:\Program Files\smartmontools\bin>smartctl.exe -d ata -a sdc

smartctl 7.1 2019-12-30 r5022 [x86_64-w64-mingw32-w10-1909] (sf-7.1-1)

Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Family: Hitachi/HGST Travelstar Z5K500

Device Model: HGST HTS545050A7E680

Serial Number: 0F115C854321

Firmware Version: 0

Device is: In smartctl database [for details use: -P show]

ATA Version is: [No Information Found]

Local Time is: Tue Nov 17 10:43:31 2020 CST

SMART support is: Available - device has SMART capability.

Enabled status cached by OS, trying SMART RETURN STATUS cmd.

SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.

(override with '-T permissive' option)

C:\Program Files\smartmontools\bin>smartctl.exe -s on sdc

smartctl 7.1 2019-12-30 r5022 [x86_64-w64-mingw32-w10-1909] (sf-7.1-1)

Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF ENABLE/DISABLE COMMANDS SECTION ===

SMART Enabled.

C:\Program Files\smartmontools\bin>smartctl.exe -a sdc

smartctl 7.1 2019-12-30 r5022 [x86_64-w64-mingw32-w10-1909] (sf-7.1-1)

Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Family: Hitachi/HGST Travelstar Z5K500

Device Model: HGST HTS545050A7E680

Serial Number: TMA55CDG1A54DM

LU WWN Device Id: 5 000cca 7fed2b684

Firmware Version: GG2OAF10

User Capacity: 500,107,862,016 bytes [500 GB]

Sector Sizes: 512 bytes logical, 4096 bytes physical

Rotation Rate: 5400 rpm

Form Factor: 2.5 inches

Device is: In smartctl database [for details use: -P show]

ATA Version is: ATA8-ACS T13/1699-D revision 6

SATA Version is: SATA 2.6, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is: Tue Nov 17 10:44:45 2020 CST

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

General SMART Values:

Offline data collection status: (0x00) Offline data collection activity

was never started.

Auto Offline Data Collection: Disabled.

Self-test execution status: ( 0) The previous self-test routine completed

without error or no self-test has ever

been run.

Total time to complete Offline

data collection: ( 45) seconds.

Offline data collection

capabilities: (0x5b) SMART execute Offline immediate.

Auto Offline data collection on/off support.

Suspend Offline collection upon new

command.

Offline surface scan supported.

Self-test supported.

No Conveyance Self-test supported.

Selective Self-test supported.

SMART capabilities: (0x0003) Saves SMART data before entering

power-saving mode.

Supports SMART auto save timer.

Error logging capability: (0x01) Error logging supported.

General Purpose Logging supported.

Short self-test routine

recommended polling time: ( 2) minutes.

Extended self-test routine

recommended polling time: ( 115) minutes.

SCT capabilities: (0x003d) SCT Status supported.

SCT Error Recovery Control supported.

SCT Feature Control supported.

SCT Data Table supported.

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 253 253 033 Pre-fail Always - 1

4 Start_Stop_Count 0x0012 086 086 000 Old_age Always - 23111

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 083 083 000 Old_age Always - 7507

10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0

12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 2682

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 - 132

193 Load_Cycle_Count 0x0012 066 066 000 Old_age Always - 348530

194 Temperature_Celsius 0x0002 193 193 000 Old_age Always - 31 (Min/Max 4/48)

196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 92

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

223 Load_Retry_Count 0x000a 100 100 000 Old_age Always - 0

SMART Error Log Version: 1

ATA Error Count: 39226 (device log contains only the most recent five errors)

CR = Command Register [HEX]

FR = Features Register [HEX]

SC = Sector Count Register [HEX]

SN = Sector Number Register [HEX]

CL = Cylinder Low Register [HEX]

CH = Cylinder High Register [HEX]

DH = Device/Head Register [HEX]

DC = Device Command Register [HEX]

ER = Error register [HEX]

ST = Status register [HEX]

Powered_Up_Time is measured from power on, and printed as

DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,

SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 39226 occurred at disk power-on lifetime: 7504 hours (312 days + 16 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

40 51 28 50 de b5 00 Error: UNC at LBA = 0x00b5de50 = 11918928

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

60 40 08 38 de b5 40 00 00:08:53.824 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:53.824 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:50.224 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:50.223 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:46.624 READ FPDMA QUEUED

Error 39225 occurred at disk power-on lifetime: 7504 hours (312 days + 16 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

40 51 28 50 de b5 00 Error: UNC at LBA = 0x00b5de50 = 11918928

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

60 40 08 38 de b5 40 00 00:08:50.224 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:50.223 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:46.624 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:46.623 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:43.024 READ FPDMA QUEUED

Error 39224 occurred at disk power-on lifetime: 7504 hours (312 days + 16 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

40 51 28 50 de b5 00 Error: UNC at LBA = 0x00b5de50 = 11918928

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

60 40 08 38 de b5 40 00 00:08:46.624 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:46.623 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:43.024 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:43.023 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:39.424 READ FPDMA QUEUED

Error 39223 occurred at disk power-on lifetime: 7504 hours (312 days + 16 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

40 51 28 50 de b5 00 Error: UNC at LBA = 0x00b5de50 = 11918928

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

60 40 08 38 de b5 40 00 00:08:43.024 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:43.023 READ LOG EXT

60 40 08 38 de b5 40 00 00:08:39.424 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:39.423 READ LOG EXT

60 40 b0 38 de b5 40 00 00:08:35.834 READ FPDMA QUEUED

Error 39222 occurred at disk power-on lifetime: 7504 hours (312 days + 16 hours)

When the command that caused the error occurred, the device was active or idle.

After command completion occurred, registers were:

ER ST SC SN CL CH DH

-- -- -- -- -- -- --

40 51 28 50 de b5 00 Error: UNC at LBA = 0x00b5de50 = 11918928

Commands leading to the command that caused the error were:

CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name

-- -- -- -- -- -- -- -- ---------------- --------------------

60 40 08 38 de b5 40 00 00:08:39.424 READ FPDMA QUEUED

2f 00 01 10 00 00 00 00 00:08:39.423 READ LOG EXT

60 40 b0 38 de b5 40 00 00:08:35.834 READ FPDMA QUEUED

60 08 a8 18 ba 84 40 00 00:08:35.547 READ FPDMA QUEUED

61 10 a0 e0 21 31 40 00 00:08:35.547 WRITE FPDMA QUEUED

SMART Self-test log structure revision number 1

No self-tests have been logged. [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1

SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS

1 0 0 Not_testing

2 0 0 Not_testing

3 0 0 Not_testing

4 0 0 Not_testing

5 0 0 Not_testing

Selective self-test flags (0x0):

After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.

C:\Program Files\smartmontools\bin>smartctl.exe -H sdc

smartctl 7.1 2019-12-30 r5022 [x86_64-w64-mingw32-w10-1909] (sf-7.1-1)

Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

C:\Program Files\smartmontools\bin>smartctl.exe --scan

/dev/sda -d ata # /dev/sda, ATA device

/dev/sdc -d sat # /dev/sdc [SAT], ATA device