Skip to content
Bytearium

No ads or affiliate links active

Hardware

SSD health: read SMART on Windows and Linux

Check SSD health: back up first, then read SMART with Windows tools, smartctl and nvme-cli. Includes the NVMe fields, the TBW math and USB bridge notes.

Your SSD will not send a postcard before it dies. It does keep a few counters, though, and reading them takes five minutes. Just do not mistake a smoke detector for a fortune teller.

The short answer

SSD health: how do you read SMART on Windows and Linux? Back up first, then read the drive's own counters. On Windows, Settings shows them for NVMe drives only [8]; PowerShell shows a few more [9][10]; smartctl from smartmontools reads the full report on Windows and Linux [1]; on Linux, nvme-cli reads the NVMe log [6]. On an NVMe drive, look at four fields first: Critical Warning, Available Spare, Percentage Used and Media and Data Integrity Errors [3][4]. A clean report is not a guarantee, and a high number is not a death date. The NVMe standard says a Percentage Used of 100 may not indicate a failure [3][4], and Google's field studies found drives that failed without any SMART warning [15] and flash drives with frequent uncorrectable errors [16]. Our assessment: treat SMART as a smoke detector, log it monthly, and let the backup do the real protecting. We make no lifetime predictions from a single reading.

How it works

  1. Back up first, then test. Reading SMART is a light query. A long self-test or a recovery attempt is not. The author of CrystalDiskInfo says it plainly: if the tool shows "Caution" or "Bad", back up your important data to another storage device before you investigate the cause [13]. The same page says that a "Caution" does not mean the drive stops today, but also gives no guarantee for months or years [13]. Our assessment: the order is backup, read, log, and only then self-test. How to run a backup you can restore is on our 3-2-1 page.
  2. What SMART is. Self-Monitoring, Analysis and Reporting Technology is the set of counters a drive keeps about itself. SATA drives report numbered attributes with a normalized VALUE, a WORST value, a THRESHOLD and a RAW value; NVMe drives report one standardized page, the SMART / Health Information log (log identifier 02h) [3][4]. The meaning of SATA attributes is up to the vendor. smartctl says so itself: an attribute of type "Pre-fail" does not mean the disk is about to fail, and it only matters when the current normalized value is at or below the threshold, which smartctl then marks FAILING_NOW (or In_the_past if only the worst value ever got there) [1]. CrystalDiskInfo shows how vendor-specific it is: it reads Micron's attribute 0xCA, Intel's 0xE8, SandForce's 0xE7 or Samsung's 0xB4 as the "life" reference, depending on the controller [12].

The NVMe fields that matter

They come from the log page that the NVMe standard defines [3]; the descriptions below follow the libnvme documentation, which quotes the standard [4][5].

FieldWhat it saysHow we read it
Critical WarningBit field: spare capacity below threshold, temperature out of range, reliability degraded, media read-only, volatile-memory backup failed, persistent memory read-only. The bits show the current state and are not persistent [4][5]Anything other than 0: back up now
Available Spare, Available Spare ThresholdRemaining spare capacity as a normalized percentage; below the threshold the drive may raise an event [4]Falling toward the threshold: plan the replacement
Percentage UsedVendor-specific estimate of the life used. 100 means the estimated endurance is consumed, "but may not indicate an NVM subsystem failure". The value may exceed 100; values above 254 appear as 255 [4]Observe the trend; at 100, plan the replacement without panic
Data Units Written, Data Units ReadCounted in thousands of 512-byte units [4][14]Convert to terabytes (see below)
Media and Data Integrity ErrorsOccurrences of unrecovered data integrity errors, for example uncorrectable ECC or a CRC failure [4]Anything above 0, or rising: back up, plan the replacement
Number of Error Information Log EntriesCount of entries over the life of the controller [4]Read the entries before you judge the number
Unsafe ShutdownsIncremented when power was lost without a shutdown notification [4]Rising: check power and cabling, not wear
Power On Hours, Temperature, Warning and Critical Composite Temperature TimeHours powered on; current composite temperature; minutes above the temperature thresholds [4]Context for the others

SATA SSDs

Windows Settings monitors NVMe SSDs only, not SATA SSDs or hard disks [8]. For a SATA SSD use smartctl or a tool such as CrystalDiskInfo. CrystalDiskInfo marks an SSD "Caution" at a remaining life of 10 percent or less for the controller families it knows [12], and its author notes that it does not support every drive and may misjudge some [13]. smartctl reports its own exit status as a bit mask: bit 3 means the SMART status check returned "DISK FAILING", bit 4 means pre-fail attributes at or below the threshold, bit 6 and bit 7 mean that the error log or the self-test log contain records of errors [1]. The man page defines these bits for ATA disks; for other drive types, check the page of your version. Read bits 6 and 7 as "look at the logs", not as "the drive is dead".

Windows: three ways

First, the Settings app. Open Start > Settings > System > Storage > Advanced storage settings > Disks & volumes, then Properties of the drive [8]. For NVMe drives Windows shows critical warnings, "Estimated remaining life", "Available spare" and "Temperature" [8]. Second, PowerShell. The first line lists your drives with bus type and health, and the second reads the reliability counters [9][10][11]:

Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, HealthStatus, OperationalStatus, Size
Get-PhysicalDisk | Get-StorageReliabilityCounter | Format-List DeviceId, Temperature, Wear, PowerOnHours, ReadErrorsTotal, ReadErrorsUncorrected, WriteErrorsTotal, WriteErrorsUncorrected

Not every drive, driver or USB bridge fills every field. Microsoft's own example output shows an empty Wear value [9], so read a blank as "not reported", never as zero. HealthStatus is Windows' summary and no replacement for the full report (our assessment). Third, smartctl. Install smartmontools, open a terminal with administrator rights (our assessment: Windows usually requires it) and let smartctl list the devices; use the name it prints for your drive, and do not copy a name from another computer [1]:

smartctl --scan
smartctl -a <device name as printed by --scan>

For NVMe, -a is equivalent to -H -i -c -A -l error -l selftest [1].

Linux: three ways

Find the drive first. Then read it with smartctl, with nvme-cli, or as JSON for a log [1][6][17][18]:

lsblk -d -o NAME,MODEL,SERIAL,SIZE,TRAN
sudo smartctl -a /dev/nvme0
sudo nvme list
sudo nvme log smart /dev/nvme0
sudo nvme log error /dev/nvme0

sudo nvme smart-log /dev/nvme0 and sudo nvme error-log /dev/nvme0 are the names before nvme-cli 3.0; the old commands still work in 3.0, print a deprecation warning and may disappear in a future release [6][7]. Check your version with nvme version. For a SATA SSD the device is usually /dev/sda (check the lsblk output), and sudo smartctl -a /dev/sda is the same call. smartctl can also answer in JSON: smartctl -j -A /dev/nvme0 returns the NVMe values under nvme_smart_health_information_log, for example percentage_used, data_units_written, media_errors, available_spare and critical_warning [18].

USB enclosures and adapters

A USB bridge sits between you and the drive and may block the SMART commands. For SATA SSDs, the SCSI/ATA Translation standard defines a vendor-independent pass-through that many USB-SATA bridges support, which smartctl uses with -d sat [1][2]. For NVMe, a smartmontools developer wrote in 2018 that no vendor-independent equivalent exists [2]; smartctl therefore has bridge-specific types such as sntasmedia, sntjmicron and sntrealtek, and since smartctl 7.5 an experimental /sat suffix that falls back to SATA for combined M.2 adapters [1]. Use a type only when the scan result or the adapter documentation supports it, and be careful with usbjmicron,x: the man page warns of I/O errors and a disconnecting drive when the bridge does not support it [1]. If a query fails, the cause may be the adapter, and the failure alone does not show a defective SSD (our assessment). When in doubt, read the drive directly in a computer.

Self-tests

smartctl -t short and smartctl -t long start the drive's own tests, and smartctl -l selftest prints the results [1]. On NVMe drives, the man page marks -t short and -t long as an experimental feature since smartctl 7.4, and the drive has to support them [1]. A passed self-test is no guarantee either. Run it after the backup, not instead of it.

From counters to terabytes

Data Units Written counts thousands of 512-byte units, so one unit stands for 512,000 bytes [14]. Terabytes written (decimal) = Data Units Written × 512,000 ÷ 10¹². The datasheet's TBW is the manufacturer's rating for host writes before the drive wears out; the Write Amplification Factor is NAND writes divided by host writes, and DWPD is TBW divided by 365, the warranty years and the capacity [14]. Because of write amplification, the drive's own Percentage Used and the share of the datasheet TBW you have written need not match (our assessment). Treat TBW as a warranty figure and Percentage Used as the drive's estimate. Neither is a countdown.

Log it: one line per month

A single reading says little; a series shows a direction. This line appends one row to a CSV file (run it with the right permissions for smartctl):

smartctl -j -A /dev/nvme0 | jq -r '.nvme_smart_health_information_log | [(now|todate), .percentage_used, .data_units_written, .media_errors, .available_spare, .critical_warning, .power_on_hours] | @csv' >> ssd-log.csv

We tested the jq filter on a hand-made sample, not on a real drive, and the key names follow the smartctl_exporter source [18]. Google's flash study found that previous errors of various types predict later uncorrectable errors [16], which is why a rising error count matters more than a single number (our assessment).

What to do with the numbers

FindingWhat we would do
Critical Warning not 0, a Windows warning, smartctl "DISK FAILING"Back up now [13], then replace the drive; do not rely on a repair (our assessment)
Media and Data Integrity Errors above 0 or risingBack up, plan the replacement, keep logging [4][16]
Available Spare falling toward its thresholdPlan the replacement
Percentage Used at 100 or above, all else cleanEstimated endurance used up, not a verdict: back up, plan the replacement [4]
Percentage Used below 100, all else cleanObserve, log monthly
Unsafe Shutdowns risingCheck power supply, cabling and shutdown habits
Everything cleanStill back up: SMART misses failures [15][16]

A scenario, not our data

Imagine an NVMe drive that has run 3,120 power-on hours and reports these values (invented for this example): Critical Warning 0, Available Spare 100 percent with a threshold of 10 percent, Percentage Used 2, Media and Data Integrity Errors 0, Error Information Log Entries 0, Unsafe Shutdowns 14, Data Units Written 7,935,401 and Data Units Read 10,584,293. The arithmetic: 7,935,401 × 512,000 bytes ≈ 4.06 TB written, and 10,584,293 × 512,000 bytes ≈ 5.42 TB read (decimal terabytes). If the datasheet said 600 TBW (an invented number), 4.06 TB would be well under one percent of that rating, while the drive itself reports 2 percent used: a gap you would expect from the drive's own estimate and write amplification, and no cause for alarm. The 14 unsafe shutdowns are worth a look at the power and the habit of switching off at the wall. The plan: back up, note the date and the values in the log, read again in a month. No forecast of the drive's remaining life comes out of this single reading.

Checklist

  • Back up your data before you run a self-test or open a case with a vendor.
  • Identify the drive and its bus: NVMe or SATA, internal or behind USB.
  • Read the report with smartctl, plus Settings or nvme-cli as a second view.
  • Check Critical Warning, Available Spare, Percentage Used and Media and Data Integrity Errors first.
  • Convert Data Units Written to terabytes and write the number and the date down.
  • Treat blank values as "not reported", never as zero.
  • Run -d sat or the bridge type only when the scan or the adapter documentation supports it.
  • Run a self-test after the backup and read it with -l selftest.
  • Log the key values once a month and compare with the last line.
  • Replace the drive when a warning, a media error or a rising error count appears, not when you have guessed a date.

Related pages: Understanding NVMe SSDs; 3-2-1 backup and restore testing; Reading Backblaze Drive Stats before you buy; Offsite backup for a homelab: the third copy; S.M.A.R.T.: drive health report; TRIM for SSDs; TBW: SSD endurance rating. Our assessment: a drive with clean SMART values still fails sometimes, so the question that decides is whether a restore from your backup works. We cite no prices here.

Primary sources

These sources are the basis of this page. That does not mean every claim was checked individually; whether a review record exists is shown above under “Status”. The interpretation and checklist are our own work.

There is no documented review record for this version yet. The text relies on the sources listed.

How this page was made: Bytearium creates these pages with the help of AI and is responsible for publishing them. AI can be wrong, so we show our sources and review status openly.

  1. smartmontools projectsmartctl(8) manual page
  2. smartmontools-support mailing listNVMe USB Passthrough
  3. NVM ExpressNVM Express Base Specification, Revision 2.1
  4. libnvme projectnvme_smart_log(2)
  5. libnvme projectnvme_smart_crit(2)
  6. nvme-cli projectnvme-log-smart(1)
  7. nvme-cli projectMigrating from nvme-cli 2.x to 3.0
  8. MicrosoftWhat to do about a critical warning for a storage device
  9. MicrosoftGet-StorageReliabilityCounter
  10. MicrosoftGet-PhysicalDisk
  11. MicrosoftMSFT_PhysicalDisk class
  12. Crystal Dew WorldHealth Status
  13. Crystal Dew WorldWhat to Do When CrystalDiskInfo Shows "Caution" or "Bad"
  14. SNIAEndurance of NVMe, SAS, and SATA SSDs
  15. Pinheiro, Weber, Barroso (Google)Failure Trends in a Large Disk Drive Population
  16. Schroeder, Lagisetty, Merchant (Google)Flash Reliability in Production: The Expected and the Unexpected
  17. util-linux projectlsblk(8)
  18. prometheus-communitysmartctl_exporter, smartctl.go

This page has no ads and no affiliate links.