smartctl can be used for checking the health of your drives (i.e. HDD, SSD, NVMe) and providing general information and statistics such as the firmware version, serial number, power-on hours and so on.
You must first ensure that your server has smartctl installed, part of the smartmontools
package.
Once installed, a very basic use of the command would be:
smartctl -a /dev/nvme1n1
You can view your partitions with tools such as "fdisk" (i.e. fdisk -l).
A quick and easy way to check the health of /dev/nvme1n1 would be as follows:
smartctl -a /dev/nvme1n1 | grep result
Example output:
[root@cello ~]# smartctl -a /dev/nvme1n1 | grep result
SMART overall-health self-assessment test result: PASSED
[root@cello ~]#