How to Read SMART Log from NVMe Device on Linux
After convincing myself that it's worth the price, I took the courage to get an NVMe SSD and install it to my PC. I've considered two strong candidates: Samsung 970 Evo Plus and Adata XPG SX8200. Adata has cheaper price and I'm going to take it, but in last minutes I choose Samsung one because it has bigger TBW so I hope it will be last longer.
NVM Express (NVMe) or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open logical device interface specification for accessing non-volatile storage media attached via PCI Express (PCIe) bus.
The acronym NVM stands for non-volatile memory, which is often NAND flash memory that comes in several physical form factors, including solid-state drives (SSDs), PCI Express (PCIe) add-in cards, M.2 cards, and other forms. NVM Express, as a logical device interface, has been designed to capitalize on the low latency and internal parallelism of solid-state storage devices.
So I go to computer shop nearby and grabbed Samsung 970 Evo Plus 500GB, open the package and install it to my PC's M.2 slot. Then install Linux Mint 19.3 as my primary Operating System. The OS installation process itself were already quicker than installing on SATA SSD.
When it boots for the first time, I'm so amazed by how quick my PC booted up. The difference from SATA SSD is unbelievable. At a glance, using SATA SSD took 14-16 seconds to boot Linux Mint 19 while using NVMe SSD only took 6-7 seconds. I guess I can justify the extra price because I can't stop smiling when I pressed power button and my PC is ready in no time.
From what I read, the chip on Samsung could runs hot, especially when large I/O operation occurs in the background. Due my big curiosity, one time I want to check if this is the case. I was surprised when I want to check the normal or idle temperature, the "SMART Data & Self-Test" menu wasn't available on
So, how to read SMART Data for NVMe drive on Linux? It turns out you just need to install a tool called
nvme-cli. The nvme-cli installation itself is just like any other installation process on Linux:
- Open your favorite terminal
nvme-cliusing your package management tool
- Check if it's installed correctly by running
Distribution Specific Installation
Ubuntu and Debian based:
$ sudo apt install nvme-cli
$ sudo dnf install nvme-cli
$ sudo yum install nvme-cli
$ sudo zypper install nvme-cli
$ sudo pacman -S nvme-cli
Read SMART Status
Once the installation process finished, we can read our device SMART Status using this command:
$ sudo nvme smart-log /dev/nvme0
Please note: If you have multiple NVMe devices, adjust your
/dev/nvme0 device as needed.
It should output something like this:
I hope that you now know how to Read SMART Log from NVMe Device on Linux. If you run into any issues or have any feedback feel free to drop a comment below.