Is your SSD healthy, lets check it

Raghav Bansal
4 min readJun 21, 2022

We often hear “Stay healthy ”, the more healthy you are, the more happy you will be and will be able to do your day to day tasks easily, in a similar manner the health of an SSD is of crucial for its optimal functioning.

Am I healthy

Health of an SSD can be measured with the help of a package named smartmontools with the help of which we can quickly get an overview of the health of our SSD

In mac it can be installed by below command

brew install smartmontools

There is a term called S.M.A.R.T which stands for Self-Monitoring, Analysis and Reporting Technology, it associates with the reliability of the SSD

Lets dive in and run a quick health check

Hurray, we can check above the self-assessment passed the test, if it not PASSED, something is going wrong with the SSD for sure

Now lets print some S.M.A.R.T attributes of my SSD

Just type the command smartctl -a (disk name)

Above we can notice various SMART attributes associated with the SSD.

Decoding some of the SMART attributes

  • Critical Warning — This tells the state of the controller, if this bit is ‘0’, in that case critical warning is not applicable
  • Temperature — depicts the temperature in Kelvin which shows the composite temperature of the controller and the namespaces associated with the controller
  • Available Spare: have the normalized percentage of the remaining space capacity available
  • Available Spare Threshold: When the Available Spare falls below the threshold indicated in this field, if the available spare falls below the threshold which is indicated in this field, an asynchronous event completion may occur
  • Percentage Used: Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer’s prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state).
  • Data Units Read: Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes read) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data read to 512 byte units. For the NVM command set, logical blocks read as part of Compare and Read operations shall be included in this value.
  • Data Units Written: Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. This value is reported in thousands (i.e., a value of 1 corresponds to 1000 units of 512 bytes written) and is rounded up. When the LBA size is a value other than 512 bytes, the controller shall convert the amount of data written to 512 byte units. For the NVM command set, logical blocks written as part of Write operations shall be included in this value. Write Uncorrectable commands shall not impact this value.
  • Host Read Commands: Contains the number of read commands completed by the controller. For the NVM command set, this is the number of Compare and Read commands.
  • Host Write Commands: Contains the number of write commands completed by the controller For the NVM command set, this is the number of Write commands.
  • Controller Busy Time: Contains the amount of time the controller is busy with I/O commands. The controller is busy when there is a command outstanding to an I/O Queue (specifically, a command was issued via an I/O Submission Queue Tail doorbell write and the corresponding completion queue entry has not been posted yet to the associated I/O Completion Queue). This value is reported in minutes.
  • Power Cycles: Contains the number of power cycles.
  • Power On Hours: Contains the number of power-on hours. Power on hours is always logging, even when in low power mode.
  • Unsafe Shutdowns: Contains the number of unsafe shutdowns. This count is incremented when shutdown notification (CC.SHN) is not received prior to loss of power.
  • Media and Data Integrity Errors: Contains the number of occurrences where the controller detected an unrecovered data integrity error. Errors such as uncorrectable ECC, CRC checksum failure, or LBA tag mismatch are included in this field.
  • Number of Error Information Log Entries: Contains the number of Error Information log entries over the life of the controller.

--

--