Determine Remaining SSD Life in Linux

By | 2014/07/15

Many SSDs have a smart value to display remaining life left. Here is how to easily check that in Linux!


Run sudo smartctl -a /dev/xxx where the device is your SSD.

(Most) SSDs will have a wear or lifetime value that counts down from 100 to 0. 100 meaning brand new, and 0 meaning dead. Typically you want to replace your SSD when it is down to about 10. 10 being 10% life left.

Below is the output of my home desktop SSD. It is showing 19% remaining. Ouch!

The value in my smart output is:
209 Remaining_Lifetime_Perc – 19

Note that other brands may indicate this value in a variety of different ways. Or some SSDs have no life indicator.

Intel SSDs typically have something like ‘Media_Wearout_Indicator’ which is the same thing – life left out of 100%.


stmiller@brahms:~$ sudo smartctl -a /dev/sde
[sudo] password for stmiller: 
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.14-0.bpo.1-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Indilinx Barefoot based SSDs
Device Model:     OCZ-VERTEX
Serial Number:    K77A71QTS30UR8JAVYEM
Firmware Version: 1.6
User Capacity:    32,017,047,552 bytes [32.0 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Tue Jul 15 20:16:57 2014 EDT
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:                (    0) seconds.
Offline data collection
capabilities:                    (0x1d) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Abort Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        No Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering               
                                        power-saving mode.                             
                                        Supports SMART auto save timer.                
Error logging capability:        (0x00) Error logging NOT supported.                   
                                        General Purpose Logging supported.             
Short self-test routine                                                                
recommended polling time:        (   0) minutes.                                       
Extended self-test routine                                                             
recommended polling time:        (   0) minutes.                                       
                                                                                       
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     0x0000   ---   ---   ---    Old_age   Offline      -       7                                                                                      
  9 Power_On_Hours          0x0000   ---   ---   ---    Old_age   Offline      -       22513                                                                                  
 12 Power_Cycle_Count       0x0000   ---   ---   ---    Old_age   Offline      -       915                                                                                    
184 Initial_Bad_Block_Count 0x0000   ---   ---   ---    Old_age   Offline      -       6                                                                                      
195 Program_Failure_Blk_Ct  0x0000   ---   ---   ---    Old_age   Offline      -       0
196 Erase_Failure_Blk_Ct    0x0000   ---   ---   ---    Old_age   Offline      -       0
197 Read_Failure_Blk_Ct     0x0000   ---   ---   ---    Old_age   Offline      -       0
198 Read_Sectors_Tot_Ct     0x0000   ---   ---   ---    Old_age   Offline      -       10363277438
199 Write_Sectors_Tot_Ct    0x0000   ---   ---   ---    Old_age   Offline      -       4344976145
200 Read_Commands_Tot_Ct    0x0000   ---   ---   ---    Old_age   Offline      -       185951095
201 Write_Commands_Tot_Ct   0x0000   ---   ---   ---    Old_age   Offline      -       44804339
202 Error_Bits_Flash_Tot_Ct 0x0000   ---   ---   ---    Old_age   Offline      -       3068243
203 Corr_Read_Errors_Tot_Ct 0x0000   ---   ---   ---    Old_age   Offline      -       2983604
204 Bad_Block_Full_Flag     0x0000   ---   ---   ---    Old_age   Offline      -       0
205 Max_PE_Count_Spec       0x0000   ---   ---   ---    Old_age   Offline      -       5000
206 Min_Erase_Count         0x0000   ---   ---   ---    Old_age   Offline      -       3465
207 Max_Erase_Count         0x0000   ---   ---   ---    Old_age   Offline      -       4434
208 Average_Erase_Count     0x0000   ---   ---   ---    Old_age   Offline      -       4089
209 Remaining_Lifetime_Perc 0x0000   ---   ---   ---    Old_age   Offline      -       19
211 SATA_Error_Ct_CRC       0x0000   ---   ---   ---    Old_age   Offline      -       0
212 SATA_Error_Ct_Handshake 0x0000   ---   ---   ---    Old_age   Offline      -       0
213 Indilinx_Internal       0x0000   ---   ---   ---    Old_age   Offline      -       0

Warning! SMART ATA Error Log Structure error: invalid SMART checksum.
SMART Error Log Version: 1
No Errors Logged

Warning! SMART Self-Test Log Structure error: invalid SMART checksum.
SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


Device does not support Selective Self Tests/Logging

5 thoughts on “Determine Remaining SSD Life in Linux

  1. RoseHosting.com

    Hi,

    thanks for posting this. In most Crucial SSD drives, the lifetime is displayed as smart attribute ‘202 Unknown_SSD_Attribute’ and the counter increases from 0 to 100. For example:

    ——–
    # smartctl -a /dev/sdb | grep “202 Unknown_SSD_Attribute”
    202 Unknown_SSD_Attribute 0x0031 090 090 000 Pre-fail Offline – 10
    ——–

    this means that the drive has used 10% of its lifetime.

    Reply
    1. Scott Miller Post author

      Thanks! It appears Crucial is doing things right. Check out the ‘VALUE’ which is 90 (instead of the raw_value). This is the correct one to inspect. 90% health.

      It appears my OCZ is not great on reporting smart values.

      Reply
  2. maltris

    Your SSD must be really old.

    22k running hours. Mine in the PC has almost 11k and in the notebook around 2k.

    I have never thrown away a SSD yet. ALl i have ever bought are still running. C:

    Reply
    1. Scott Miller Post author

      Maybe this will convince $wife to let me purchase a new SSD… 🙂

      Reply
  3. Chad

    Having an issue here

    root@server [~]# smartctl -a /dev/sda
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-673.8.1.lve1.4.3.el6.x86_64] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    Vendor: LSI
    Product: MR9271-4i
    Revision: 3.24
    User Capacity: 999,653,638,144 bytes [999 GB]
    Logical block size: 512 bytes
    Logical Unit id: 0x600605b006c8454019f3880d0631381a
    Serial number: 001a3831060d88f3194045c806b00506
    Device type: disk
    Local Time is: Tue Jun 28 12:56:46 2016 CDT
    Device does not support SMART
    Error Counter logging not supported
    Device does not support Self Test logging

    root@server [~]# smartctl -a /dev/sda1
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-673.8.1.lve1.4.3.el6.x86_64] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    Smartctl open device: /dev/sda1 failed: INQUIRY failed

    root@server [~]# smartctl -s on /dev/sda
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-673.8.1.lve1.4.3.el6.x86_64] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    unable to fetch IEC (SMART) mode page [unsupported field in scsi command]
    A mandatory SMART command failed: exiting. To continue, add one or more ‘-T permissive’ options.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.