1575  
   0
Linux如何查看SSD磁盘的S.M.A.R.T信息
作者:高飞于 2018年12月27日 发布在分类 / 经验案例 / FAQ 下,并于 2018年12月27日 编辑
S.M.A.R.T 磁盘 Linux

一、提问

Linux如何查看SSD磁盘的S.M.A.R.T信息


二、解答

Linux环境下,例如待查询SSD盘为/dev/sdb。

[root@localhosttest]#smartctl -a /dev/sdb

smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-514.el7.x86_64] (local build)

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



=== START OF INFORMATION SECTION ===

Device Model: SAMSUNG MZ7KM1T9HAJM-00005

Serial Number: S2HNNX0H714025

LU WWN Device Id: 5 002538 c4038335c

Firmware Version: GXM1203Q

User Capacity: 1,920,383,410,176 bytes [1.92 TB]

Sector Size: 512 bytes logical/physical

Rotation Rate: Solid State Device

Device is: Not in smartctl database [for details use: -P showall]

ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4c

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

Local Time is: Mon Dec 3 13:59:04 2018 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: (0x02) Offline data collection activity

was completed without error.

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:( 6000) seconds.

Offline data collection

capabilities: (0x53) SMART execute Offline immediate.

Auto Offline data collection on/off support.

Suspend Offline collection upon new

command.

No 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:( 100) 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: 1

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE

5 Reallocated_Sector_Ct 0x0033 099 099 010 Pre-fail Always - 52

9 Power_On_Hours 0x0032 096 096 000 Old_age Always - 15596

12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 25

177 Wear_Leveling_Count 0x0013 099 099 005 Pre-fail Always - 41

179 Used_Rsvd_Blk_Cnt_Tot 0x0013 099 099 010 Pre-fail Always - 52

180 Unused_Rsvd_Blk_Cnt_Tot 0x0013 099 099 010 Pre-fail Always - 15224

181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0

182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0

183 Runtime_Bad_Block 0x0013 099 099 010 Pre-fail Always - 52

184 End-to-End_Error 0x0033 100 100 097 Pre-fail Always - 0

187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 229

190 Airflow_Temperature_Cel 0x0032 060 050 000 Old_age Always - 40

195 Hardware_ECC_Recovered 0x001a 199 199 000 Old_age Always - 229

197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0

199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0

202 Unknown_SSD_Attribute 0x0033 100 100 010 Pre-fail Always - 0

235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 17

241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 85798256112

242 Total_LBAs_Read 0x0032 099 099 000 Old_age Always - 280688136127

243 Unknown_Attribute 0x0032 099 099 000 Old_age Always - 1

244 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0

245 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 65535

246 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 65535

247 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 65535

251 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 152597909000



SMART Error Log Version: 1

ATA Error Count: 229 (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.ssswhere DD=days, hh=hours, mm=minutes,

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



Error 229 occurred at disk power-on lifetime: 15550 hours (647 days + 22 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 00 00 28 3f e0 Error:



Commands leading to the command that caused the error were:

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

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



Error 228 occurred at disk power-on lifetime: 15547 hours (647 days + 19 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 00 00 28 3f e0 Error:



Commands leading to the command that caused the error were:

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

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



Error 227 occurred at disk power-on lifetime: 15547 hours (647 days + 19 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 00 00 20 6b e0 Error:



Commands leading to the command that caused the error were:

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

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



Error 226 occurred at disk power-on lifetime: 15546 hours (647 days + 18 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 00 00 38 26 e0 Error:



Commands leading to the command that caused the error were:

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

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



Error 225 occurred at disk power-on lifetime: 15546 hours (647 days + 18 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 00 00 38 24 e0 Error:



Commands leading to the command that caused the error were:

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

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



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

255 0 65535 Read_scanning was completed without error

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 after0 minutedelay.


 知识评论当前评论数0

 推荐知识


 访问权限

创建人 高飞
文档编辑权限 创建者私有
文档阅读权限 来自分类
分类阅读权限 所有人
分类编辑权限 技术服务部  : 机构     渠道合作伙伴  : 机构     系统管理员 : 人员     
分类审核权限 审核小组  : 岗位    
分类预览权限 审核小组 : 岗位    
分类下载权限 技术服务部  : 机构    
 历史版本

修改日期 修改人 备注
2018-12-27 10:14:30[当前版本] 高飞 CREAT

 目录
    宏杉案例知识库-V4.0.1