NVMe is an acronym for Non-Volatile Memory Express. It is a communications interface standard that defines a command set and feature set for PCIe-based SSDs. NVMe SSD reads and writes data three to four times faster than the SATA SSDs. You must have support for NVMe with M.2 slot on your motherboard to use NVMe SSD. Most modern Laptops or desktop systems have at least one such slot. This page shows how to read and find out NVMe SSD temperature on Linux.
Linux find NVMe SSD temperature command
The procedure to show NVMe SSD temperature on Linux is as follows:
- Open the terminal application
- Install nvme-cli tool on Linux using your package manager
- Run sudo nvme smart-log /dev/nvme0 Linux command to display temperature information for NVMe SSD
Let us see how to install nvme-cli and display temperature using the command line options.
How to install nvme-cli on Linux
Run the following command as per your Linux distro.
Ubuntu/Debian Linux
Type apt command or apt-get command:
sudo apt install nvme-cli
Fedora Linux
Execute the following dnf command:
sudo dnf install nvme-cli
CentOS/RHEL 7.x or 8.x
Turn on EPEL repo on a CentOS/RHEL 7.x (see how to enable EPEL repo on a CentOS 8 or enable EPEL repo on an RHEL 8) and run:
sudo yum install nvme-cli
Sample outputs:
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.hbcse.tifr.res.in * epel: repos.del.extreme-ix.org * extras: centos.hbcse.tifr.res.in * updates: centos.hbcse.tifr.res.in Resolving Dependencies --> Running transaction check ---> Package nvme-cli.x86_64 0:1.8.1-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =============================================================================== Package Arch Version Repository Size =============================================================================== Installing: nvme-cli x86_64 1.8.1-3.el7 base 282 k Transaction Summary =============================================================================== Install 1 Package Total download size: 282 k Installed size: 519 k Is this ok [y/d/N]: y Downloading packages: nvme-cli-1.8.1-3.el7.x86_64.rpm | 282 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : nvme-cli-1.8.1-3.el7.x86_64 1/1 Verifying : nvme-cli-1.8.1-3.el7.x86_64 1/1 Installed: nvme-cli.x86_64 0:1.8.1-3.el7 Complete!
Arch Linux
Type pacman command:
sudo pacman -S nvme-cli
OpenSUSE or Suse Linux
As usual run the zypper command:
sudo zypper install nvme-cli
Alpine Linux
Use apk command as follows
sudo apk add nvme-cli nvme-cli-doc
How do I display NVMe PCI SSD temperature on Linux
First, login as root user using the su command or sudo command:
sudo -i
OR
su -
Now, check NVMe temp in Linux:
sudo nvme smart-log {Device_Name}
sudo nvme smart-log /dev/nvme0
sudo nvme smart-log /dev/nvme1n1
The ‘{Device_Name}’ may be either an NVMe character device. For example, /dev/nvme0) or an nvme block device such as /dev/nvme0n1. Use the grep command to filter out data:
sudo nvme smart-log /dev/nvme0 | grep '^temperature'
Use bash for loop for multiple devices as follows:
# /dev/nvme0 and /dev/nvme1 for d in /dev/nvme{0..1} do echo "$d - $(sudo nvme smart-log $d | grep '^temperature')" done
Conclusion
You learned the nvme Linux command that we used to find NVMe SSD temperature. This command has many more options. See the man page by typing the following man command or visiting the project page online here:
man nvme
nvme help
🐧 0 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |