SSD "health"on a Linux computer

Discussion in 'all things UNIX' started by bellgamin, Mar 14, 2023.

  1. longshots

    longshots Registered Member

    Joined:
    Oct 20, 2017
    Posts:
    684
    Location:
    Australia
    That, sadly, is the common attitude. If it's on/for the Internet then it should be free.
    I was always in the minority when I argued that we should pay for software that we needed to use.
    When I was a MS user Directory Opus [4] was one of my first purchases. And 20 years ago the cost was about 2+ what it is today, which was then not an insignificant sum.

    Users now are starting to upgrade to paid versions in quite a few areas - antivirus, VPN, storage, secure email - but it's still a long and steep road.
    As you mentioned, I am also "amazed at how many free, secure, top-grade" apps there are - regardless of OS.
     
  2. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    2,244
    GSmartControl detects my SATA SSD but it doesn't detect my M2 NVME although smartmontools support NVME.

    sudo smartctl -i /dev/nvme0 gives:

    Code:
    smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.8-arch1-1] (local build)
    Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Number:                       WDS100T1X0E-00AFY0
    Serial Number:                      20503D440503
    Firmware Version:                   611100WD
    PCI Vendor/Subsystem ID:            0x15b7
    IEEE OUI Identifier:                0x001b44
    Total NVM Capacity:                 1.000.204.886.016 [1,00 TB]
    Unallocated NVM Capacity:           0
    Controller ID:                      8224
    NVMe Version:                       1.4
    Number of Namespaces:               1
    Namespace 1 Size/Capacity:          1.000.204.886.016 [1,00 TB]
    Namespace 1 Formatted LBA Size:     512
    Namespace 1 IEEE EUI-64:            001b44 4a46ee0a0b
    Local Time is:                      Fri Mar 31 14:15:14 2023 CEST
    Explicitly enabling SMART doesn't make a difference.

    More info is available with sudo smartctl -a /dev/nvme0:

    Code:
    smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.8-arch1-1] (local build)
    Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Number:                       WDS100T1X0E-00AFY0
    Serial Number:                      20503D440503
    Firmware Version:                   611100WD
    PCI Vendor/Subsystem ID:            0x15b7
    IEEE OUI Identifier:                0x001b44
    Total NVM Capacity:                 1.000.204.886.016 [1,00 TB]
    Unallocated NVM Capacity:           0
    Controller ID:                      8224
    NVMe Version:                       1.4
    Number of Namespaces:               1
    Namespace 1 Size/Capacity:          1.000.204.886.016 [1,00 TB]
    Namespace 1 Formatted LBA Size:     512
    Namespace 1 IEEE EUI-64:            001b44 4a46ee0a0b
    Local Time is:                      Fri Mar 31 13:25:54 2023 CEST
    Firmware Updates (0x14):            2 Slots, no Reset required
    Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
    Optional NVM Commands (0x005f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
    Log Page Attributes (0x1e):         Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg
    Maximum Data Transfer Size:         128 Pages
    Warning  Comp. Temp. Threshold:     84 Celsius
    Critical Comp. Temp. Threshold:     88 Celsius
    Namespace 1 Features (0x02):        NA_Fields
    
    Supported Power States
    St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
     0 +     9.00W    9.00W       -    0  0  0  0        0       0
     1 +     4.10W    4.10W       -    0  0  0  0        0       0
     2 +     3.50W    3.50W       -    0  0  0  0        0       0
     3 -   0.0250W       -        -    3  3  3  3     5000   10000
     4 -   0.0050W       -        -    4  4  4  4     5000   45000
    
    Supported LBA Sizes (NSID 0x1)
    Id Fmt  Data  Metadt  Rel_Perf
     0 +     512       0         2
     1 -    4096       0         1
    
    === START OF SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    SMART/Health Information (NVMe Log 0x02)
    Critical Warning:                   0x00
    Temperature:                        35 Celsius
    Available Spare:                    100%
    Available Spare Threshold:          10%
    Percentage Used:                    0%
    Data Units Read:                    75.984.001 [38,9 TB]
    Data Units Written:                 11.834.725 [6,05 TB]
    Host Read Commands:                 290.966.910
    Host Write Commands:                256.962.262
    Controller Busy Time:               1.104
    Power Cycles:                       906
    Power On Hours:                     2.276
    Unsafe Shutdowns:                   6
    Media and Data Integrity Errors:    0
    Error Information Log Entries:      0
    Warning  Comp. Temperature Time:    0
    Critical Comp. Temperature Time:    0
    
    Error Information (NVMe Log 0x01, 16 of 256 entries)
    No Errors Logged
    
    ... or with sudo nvme smart-log /dev/nvme0:

    Code:
    Smart Log for NVME device:nvme0 namespace-id:ffffffff
    critical_warning                        : 0
    temperature                             : 35°C (308 Kelvin)
    available_spare                         : 100%
    available_spare_threshold               : 10%
    percentage_used                         : 0%
    endurance group critical warning summary: 0
    Data Units Read                         : 75.984.002 (38,90 TB)
    Data Units Written                      : 11.834.774 (6,06 TB)
    host_read_commands                      : 290.966.923
    host_write_commands                     : 256.962.504
    controller_busy_time                    : 1.104
    power_cycles                            : 906
    power_on_hours                          : 2.276
    unsafe_shutdowns                        : 6
    media_errors                            : 0
    num_err_log_entries                     : 0
    Warning Temperature Time                : 0
    Critical Composite Temperature Time     : 0
    Thermal Management T1 Trans Count       : 0
    Thermal Management T2 Trans Count       : 0
    Thermal Management T1 Total Time        : 0
    Thermal Management T2 Total Time        : 0
    .. or more verbose with sudo nvme smart-log -H /dev/nvme0:

    Code:
    Smart Log for NVME device:nvme0 namespace-id:ffffffff
    critical_warning                        : 0
          Available Spare[0]             : 0
          Temp. Threshold[1]             : 0
          NVM subsystem Reliability[2]   : 0
          Read-only[3]                   : 0
          Volatile mem. backup failed[4] : 0
          Persistent Mem. RO[5]          : 0
    temperature                             : 35°C (308 Kelvin)
    available_spare                         : 100%
    available_spare_threshold               : 10%
    percentage_used                         : 0%
    endurance group critical warning summary: 0
    Data Units Read                         : 75.984.002 (38,90 TB)
    Data Units Written                      : 11.834.793 (6,06 TB)
    host_read_commands                      : 290.966.923
    host_write_commands                     : 256.962.612
    controller_busy_time                    : 1.104
    power_cycles                            : 906
    power_on_hours                          : 2.276
    unsafe_shutdowns                        : 6
    media_errors                            : 0
    num_err_log_entries                     : 0
    Warning Temperature Time                : 0
    Critical Composite Temperature Time     : 0
    Thermal Management T1 Trans Count       : 0
    Thermal Management T2 Trans Count       : 0
    Thermal Management T1 Total Time        : 0
    Thermal Management T2 Total Time        : 0
    And sudo hdsentinel or sudo hdsentinel --verbose reports:

    Code:
    HDD Device  0: /dev/nvme0            
    HDD Model ID : WDS100T1X0E-00AFY0
    HDD Serial No: 20503D440503
    HDD Revision : 611100WD
    HDD Size     : 953869 MB
    Interface    : NVMe
    Temperature  : 35 °C
    Highest Temp.: 35 °C
    Health       : 100 %
    Performance  : 100 %
    Power on time: 94 days, 20 hours
    Est. lifetime: more than 1000 days
    Total written: 5.51 TB
      The status of the solid state disk is PERFECT. Problematic or weak sectors were not found.
      The health is determined by SSD specific S.M.A.R.T. attribute(s):  Available Spare (Percent), Percentage Used
        No actions needed.
    
    So hdsentinel doesn't provide more info than smartctl.
     
  3. reasonablePrivacy

    reasonablePrivacy Registered Member

    Joined:
    Oct 7, 2017
    Posts:
    2,221
    Location:
    Member state of European Union
    It seems to need root privileges. Probably adding command to sudoers or using gksu would remove the need for having terminal in backhround.
    Gksu would display dialog for password similar to hardened UAC im Windows.

    Free as in freedom, not as in beer.
    In current day and age somebody must be living under the strone to come to GNU/Linux or other FOSS OS just to run closed source software with root privileges.
    I am okay for donating money for FOSS though.
     
    Last edited: Apr 1, 2023
  4. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,443
    Location:
    Among the gum trees
    Right! :thumb:
     
  5. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    3,097
    Location:
    the Netherlands
    GSmartControl doesn't support PCIe/NVMe disks.
    And how to run the Hard Disk Sentinel Linux GUI version is a riddle wrapped in an enigma.

    But I noticed a new GUI application to show SMART data:
    QDiskInfo
    https://github.com/edisionnano/QDiskInfo

    "QDiskInfo is a frontend for smartctl (part of the smartmontools package). It provides a user experience similar to CrystalDiskInfo. It shows the SMART (Self-Monitoring, Analysis, and Reporting Technology) data of modern hard disk drives."

    It should support NVMe, although I haven't tested, as my systems don't have NVMe drives.

    I downloaded and ran the binary: default.QDiskInfo-Qt5-libc
    https://github.com/edisionnano/QDiskInfo#packages -->
    https://github.com/edisionnano/QDiskInfo/releases

    N.B. The current version 0.3 is mentioned as an alpha version, thus meant for testing, not a release version.
    Nevertheless, it seems to work nicely, already.
     
  6. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    2,244
    It seems it does.
     
  7. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    3,097
    Location:
    the Netherlands
    Regarding GSmartControl, starting from version 2.0.0, it now offers support for NVMe drives as well.
    https://gsmartcontrol.shaduri.dev/supported-hardware
    https://github.com/ashaduri/gsmartcontrol/releases
    https://github.com/ashaduri/gsmartcontrol/releases/tag/v2.0.0

    However, most repositories do not yet include the new GSmartControl version.
    https://repology.org/project/gsmartcontrol/versions

    If your distro's repository does not include the new GSmartControl version yet, and you really want it, for a number of distros (Debian, Fedora, openSUSE, SUSE SLE, Ubuntu), a recent package is available to download and install.
    https://gsmartcontrol.shaduri.dev/downloads -->
    https://software.opensuse.org//download.html?project=home%3Aalex_sh%3Agsmartcontrol%3Astable_latest&package=gsmartcontrol
     
  8. bellgamin

    bellgamin Registered Member

    Joined:
    Aug 1, 2002
    Posts:
    8,123
    Location:
    Hawaii
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.