Close Menu
    Facebook X (Twitter) Instagram
    • Download Cisco Packet Tracer
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Server
    • WordPress
    IT Beginner
    Home»Tips – Tricks»How to check SSD life left on linux
    Tips – Tricks

    How to check SSD life left on linux

    17/07/2017Updated:18/07/2017No Comments6 Mins Read

     

    To check ssd life left on a (solid-state drive) ssd, you will need to install the smartmontools package. It contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI hard disks.

    For Ubuntu, Mint, or Debian based distributions

    # apt-get install smartmontools

    For Fedora, Centos, or Red Hat based distributions

    # yum install smartmontools

    The Media_Wearout_Indicator is what you are looking for. For 100 means your ssd has 100% life, the lower number means less life left.

    # smartctl -a /dev/sda | grep Media_Wearout_Indicator

    Output from my laptop

    233 Media_Wearout_Indicator 0×0032 100 100 000 Old_age Always – 0

    If you want to see more details and full attributes from your drive, you can run

    # smartctl -data -A /dev/sda

    and the output

    # smartctl -data -A /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-49-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

    === 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
    5 Reallocated_Sector_Ct 0×0032 100 100 000 Old_age Always – 0
    9 Power_On_Hours 0×0032 000 000 000 Old_age Always – 232959027031342
    12 Power_Cycle_Count 0×0032 100 100 000 Old_age Always – 279
    170 Unknown_Attribute 0×0033 100 100 010 Pre-fail Always – 0
    171 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 0
    172 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 0
    174 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 278
    184 End-to-End_Error 0×0033 100 100 090 Pre-fail Always – 0
    187 Reported_Uncorrect 0×0032 100 100 000 Old_age Always – 0
    192 Power-Off_Retract_Count 0×0032 100 100 000 Old_age Always – 278
    225 Load_Cycle_Count 0×0032 100 100 000 Old_age Always – 10752
    226 Load-in_Time 0×0032 100 100 000 Old_age Always – 65535
    227 Torq-amp_Count 0×0032 100 100 000 Old_age Always – 66
    228 Power-off_Retract_Count 0×0032 100 100 000 Old_age Always – 65535
    232 Available_Reservd_Space 0×0033 100 100 010 Pre-fail Always – 0
    233 Media_Wearout_Indicator 0×0032 100 100 000 Old_age Always – 0
    241 Total_LBAs_Written 0×0032 100 100 000 Old_age Always – 10752
    242 Total_LBAs_Read 0×0032 100 100 000 Old_age Always – 21803
    249 Unknown_Attribute 0×0013 100 100 000 Pre-fail Always – 357

    To show your sdd information (mine is Intel 520 Series Cherryville 180 GB)

    # smartctl -a /dev/sda

    smartctl -a /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-49-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

    === START OF INFORMATION SECTION ===
    Device Model: INTEL SSDSC2CW180A3
    Serial Number: CVCV204408A6180EGN
    LU WWN Device Id: 5 001517 bb2824682
    Firmware Version: 400i
    User Capacity: 180,045,766,656 bytes [180 GB]
    Sector Size: 512 bytes logical/physical
    Device is: Not in smartctl database [for details use: -P showall]
    ATA Version is: 8
    ATA Standard is: ACS-2 revision 3
    Local Time is: Thu Jul 11 00:55:16 2013 PDT
    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: (0×00) 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: ( 2097) seconds.
    Offline data collection
    capabilities: (0x7f) SMART execute Offline immediate.
    Auto Offline data collection on/off support.
    Abort Offline collection upon new
    command.
    Offline surface scan supported.
    Self-test supported.
    Conveyance Self-test supported.
    Selective Self-test supported.
    SMART capabilities: (0×0003) Saves SMART data before entering
    power-saving mode.
    Supports SMART auto save timer.
    Error logging capability: (0×01) Error logging supported.
    General Purpose Logging supported.
    Short self-test routine
    recommended polling time: ( 1) minutes.
    Extended self-test routine
    recommended polling time: ( 48) minutes.
    Conveyance self-test routine
    recommended polling time: ( 2) minutes.
    SCT capabilities: (0×0021) SCT Status supported.
    SCT Data Table supported.

    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
    5 Reallocated_Sector_Ct 0×0032 100 100 000 Old_age Always – 0
    9 Power_On_Hours 0×0032 000 000 000 Old_age Always – 46385647693103
    12 Power_Cycle_Count 0×0032 100 100 000 Old_age Always – 279
    170 Unknown_Attribute 0×0033 100 100 010 Pre-fail Always – 0
    171 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 0
    172 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 0
    174 Unknown_Attribute 0×0032 100 100 000 Old_age Always – 278
    184 End-to-End_Error 0×0033 100 100 090 Pre-fail Always – 0
    187 Reported_Uncorrect 0×0032 100 100 000 Old_age Always – 0
    192 Power-Off_Retract_Count 0×0032 100 100 000 Old_age Always – 278
    225 Load_Cycle_Count 0×0032 100 100 000 Old_age Always – 10754
    226 Load-in_Time 0×0032 100 100 000 Old_age Always – 65535
    227 Torq-amp_Count 0×0032 100 100 000 Old_age Always – 66
    228 Power-off_Retract_Count 0×0032 100 100 000 Old_age Always – 65535
    232 Available_Reservd_Space 0×0033 100 100 010 Pre-fail Always – 0
    233 Media_Wearout_Indicator 0×0032 100 100 000 Old_age Always – 0
    241 Total_LBAs_Written 0×0032 100 100 000 Old_age Always – 10754
    242 Total_LBAs_Read 0×0032 100 100 000 Old_age Always – 21803
    249 Unknown_Attribute 0×0013 100 100 000 Pre-fail Always – 357

    SMART Error Log not supported
    SMART Self-test Log not supported
    Note: selective self-test log revision number (0) not 1 implies that no selective self-test has ever been run
    SMART Selective self-test log data structure revision number 0
    Note: revision number not 1 implies that no selective self-test has ever been run
    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 (0×0):
    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.

    To check if TRIM is enabled on your system or not, replacing /dev/sda with your SSD device name

    sudo hdparm -I /dev/sda | awk '/.*TRIM supported.*/{ if ($1 == "*") print "Yes, TRIM is enabled"; else print "No, TRIM is not enabled.";}'
    life s.m.a.r.t solid state drive ssd
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHow to install GUI on Ubuntu and Linux Mint
    Next Article Intel 520 ssd 180gb in Dell 1121 with Ubuntu

    Related Posts

    Tips – Tricks

    How to fix nginx an upstream response is buffered to a temporary file error

    05/08/2017
    Tips – Tricks

    Optimize WordPress with Nginx

    04/08/2017
    Security

    How to secure Apache HTTP Web Server

    29/07/2017
    Subscribe
    Notify of
    guest

    guest

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    Tags
    apache centos Centos 6 cuda Desktop Environment dual boot environment featured gnome GUI hostname hosts intel kernel kill lamp server lemp server life MariaDB netflix nginx nvidia password php-fpm phpmyadmin pids processes s.m.a.r.t Security session solid state drive ssd ssh ssh server tag 1 tag 2 Ubuntu upgrade varnish VirtualBox VNC Server web server window manager wordpress xfce
    Facebook X (Twitter) Instagram Pinterest

    Type above and press Enter to search. Press Esc to cancel.

    wpDiscuz