If your PC boots Linux and has an M.2 NVMe SSD, you don't need a vendor app to find out how healthy the drive is. The drive keeps its own SMART/health log, error log and self-test results, and the free nvme-cli tool can read all of them from a terminal. This guide is based on the nvme-cli project's own README and man pages, the Arch Wiki's NVMe page and Percona's explainer on reading NVMe health data, all checked on 2 December 2026. The output on your drive may show more or fewer fields than the examples described.
What nvme-cli is
The project describes nvme-cli as the command line tool for managing NVMe devices, built on the libnvme library. It also handles networked NVMe-oF storage and has vendor-specific plugins, but for a desktop PC the useful part is reading the logs your SSD already keeps. The newest release on the project's GitHub page is version 3.3, published on 25 November 2026.
It's packaged by most Linux distributions, including Arch, Debian, Fedora, Ubuntu and openSUSE, under the name nvme-cli, so install it with your normal package manager:
sudo apt install nvme-cli # Ubuntu, Debian, Mint
sudo dnf install nvme-cli # Fedora
sudo pacman -S nvme-cli # Arch
The project says man nvme gives the full documentation and nvme help gives a short summary. The examples in the man pages are run as root, so put sudo in front of the commands below.
A note on command names
Command names aren't the same in every guide, which trips people up when copying commands from the web. Ubuntu 24.04's packaged version (2.8) uses hyphenated commands such as nvme smart-log and nvme error-log, which is what this guide shows. The Arch Wiki's examples use a different form, such as nvme log smart and nvme log error. If a command isn't recognised, run nvme help to see the names your version expects.
Step 1: Find your NVMe drives
sudo nvme list
The man page says this scans the system for NVMe devices and returns the /dev node for each one along with some pertinent information. The Arch Wiki adds that the list includes the name, serial number, size and LBA format.
You'll see two kinds of name. /dev/nvme0 is the drive's controller (a character device) and /dev/nvme0n1 is a namespace on it, which is the block device your partitions live on. The man pages for the log and self-test commands below say they accept either. If you have more than one SSD, check you've picked the right one: the Arch Wiki warns that device node numbering is arbitrary.
To see what the drive supports, sudo nvme id-ctrl -H /dev/nvme0 sends an identify controller command, and the -H option parses many bit fields into human-readable form.
Step 2: Read the SMART/health log
sudo nvme smart-log /dev/nvme0
This retrieves the drive's SMART log page. The Arch Wiki describes it as covering health status, temperature, endurance and more. Percona's guide to NVMe health (written in 2017 by Peter Zaitsev, using the NVMe specification) explains the fields most worth reading:
critical_warning: the smartctl manual says this byte is what it uses to report an NVMe drive's overall health status, so a value other than 0 means the drive itself is flagging a problem. Back up first and investigate second.
available_spare and available_spare_threshold: a normalised percentage of spare capacity left. Percona notes that when available spare falls below the threshold, the drive can signal an event to the system.
percentage_used: a vendor-specific estimate of how much of the drive's rated life has been used, based on actual usage and the maker's prediction. Percona notes this can go past 100% on a drive used beyond its planned life.
data_units_read / data_units_written: each unit is 1,000 blocks of 512 bytes, so multiply by 512,000 to get bytes. This is the easiest way to compare your writes with the drive's TBW rating.
unsafe_shutdowns: how many times power was lost without a proper shutdown notice.
media_errors and num_err_log_entries: running counters of media errors and error log entries. What matters most is whether they keep growing.
Warning and Critical Composite Temperature Time: minutes spent above the drive's warning or critical temperature. Percona says these should be zero.
The unsafe_shutdowns counter records power losses rather than faults in the SSD itself, but Percona notes that, depending on the drive, an unsafe shutdown might corrupt user data, so a fast-rising count is worth tracking down. For Windows-side checks and general advice, see our guide to checking SSD health.
Step 3: Check the error log
sudo nvme error-log /dev/nvme0
The man page says this requests 64 entries by default (change that with -e). The Arch Wiki's tip is to look for entries where the error count isn't 0. Compare the list over time: a growing list alongside a rising media_errors count is a clearer warning sign than a single old entry.
Step 4: Run a drive self-test
NVMe drives that support it can run a built-in self-test. The device-self-test command takes a self-test code:
sudo nvme device-self-test /dev/nvme0 -n 1 -s 1 # short test
sudo nvme device-self-test /dev/nvme0 -n 1 -s 2 # extended test
sudo nvme device-self-test /dev/nvme0 -n 1 -s 0xf # abort a running test
According to the man page, code 1 starts a short test, 2 starts an extended test and 0xf aborts the test, and -w makes the command wait until the test finishes. Then read the results:
sudo nvme self-test-log /dev/nvme0
The man page says this shows the 20 most recent results.
Step 5: Check firmware slots
sudo nvme fw-log /dev/nvme0
This reads the firmware log page, which the Arch Wiki uses to show the firmware revision in each of the drive's firmware slots. That's handy before a firmware update. The Arch Wiki also documents flashing firmware with nvme-cli, but for most people the simpler route is your SSD maker's own tool or fwupd where the drive is supported. Our guide to updating SSD firmware covers the general precautions.
Scripting and logging
Every command shown here supports -o json (or --output-format=json), so you can feed the results into a script or a monitoring dashboard. A simple weekly cron job that saves nvme smart-log -o json to a file gives you a history of percentage_used and media_errors, which is more useful than a one-off snapshot.
nvme-cli or smartctl?
smartctl from smartmontools also reads NVMe health data and works on SATA drives too, and GSmartControl puts a graphical front end on it. If you'd prefer a desktop app, GSmartControl and GNOME Disks both show SMART data graphically; for the smartctl side in depth, see smartmontools vs CrystalDiskInfo. nvme-cli's advantage is that it speaks NVMe natively and exposes NVMe-specific logs such as the firmware slots. For other Linux hardware tools, see our best Linux hardware info tools.