35+ stories, thoughts and ideas.35+ stories, thoughts and ideas.


stories, thoughts and ideas.

Linux下查看SSD寿命

方法一

smartctl -l devstat /dev/sd? 查看 Percentage Used Endurance Indicator 的数值,新盘是0%。

$ sudo smartctl -l devstat  /dev/sdv
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-41-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 1) ==
0x01  0x008  4             200  ---  Lifetime Power-On Resets
0x01  0x010  4           13772  ---  Power-on Hours
0x01  0x018  6      2808506975  ---  Logical Sectors Written
0x01  0x020  6          323523  ---  Number of Write Commands
0x01  0x028  6      2305584725  ---  Logical Sectors Read
0x01  0x030  6          108834  ---  Number of Read Commands
0x07  =====  =               =  ===  == Solid State Device Statistics (rev 1) ==
0x07  0x008  1              10  ---  Percentage Used Endurance Indicator     <========
                                |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

方法二

smartctl -A /dev/sd? 查看 Wear_Leveling_Count 的数值。

$ sudo smartctl -A /dev/sdv
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-41-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
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
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       13772
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       200
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0     <=====
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       121
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       45
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       100
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       173926
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       166252
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       529644

方法三

厂家专用工具,比如intel ssd可以用 intel MAS cli。
• SSD information: intelmas show -all -intelssd +SSD_index
• SMART attributes: intelmas show -smart -intelssd +SSD_index

本原创文章未经允许不得转载 | 当前页面:35+ stories, thoughts and ideas. » Linux下查看SSD寿命

评论