Checking Drive SMART Values in Linux

Last Update: August 19th, 2021
Article ID: 1015207

Modern hard drives and solid state drives include support for Self-Monitoring, Analysis, and Reporting Technology or SMART.  SMART data can show signs of drive failure or wear before data loss occurs and can be used to monitor the health of the drive including the temperature sensors in the drive itself.

From the terminal with smartctl

The smartctl command is provided in the smartmontools suite. This can be downloaded and installed for Windows or Linux. The current stable version 7.2 released December 30 2020, Fedora 34 provides the latest version through DNF, however both Ubuntu 20.04 LTS and CentOS 8 provide an older version that does not support all of our storage products. The latest daily build can be downloaded from here, these are built from the latest source code and include support for newer chipsets not available in the 7.2 release.

Smartmontools version 7.2 and above includes built-in support for these Plugable Products:

Downloading and running

  1. Download smartmontools from your repository using the following commands:
    1. For Ubuntu 20.04 LTS or Pop!OS: `sudo apt install smartmontools`
    2. For Fedora or CentOS: `sudo dnf install smartmontools`
  2. To scan for detected drives run the following command: `smartctl --scan`
  3. To print all SMART data for a specific drive use the command: `sudo smartctl --all /dev/sdn` where /dev/sdn is the path to the block device.
  4. Optionally, this output can be saved to a file using the following: `sudo smartctl --all /dev/sdn > ~/smartdata.txt` for detailed examination

Downloading and running the nightly build

If your distribution has not updated to smartmontools 7.2, then running the nightly build is the easiest way to read SMART values on our USBC-NVME enclsoure, smartmontools 7.1 supports both our USB-C SATA adapter and vertical drive dock.

  1. Download smartmontools latest build for your system from the nightly builds webpage here https://builds.smartmontools.org/
    1. For modern x86_64 computers I recommend: 'builds/smartmontools-linux-x86_64-static-7.3-r####.tar.gz' where #### depends on the build number.
  2. Extract the contents of the tarball using the following command: `tar -xf smartmontools-linux-x86_64-static-7.3-*.tar.gz`
    1. This creates a file structure in the same directory as the smartmontools tarball file.
    2. Navigate into the file structure with the following command: `cd ./usr/local/sbin`
  3. To scan for detected drives run the following command: `./smartctl --scan`
    1. Please note, the './' preceding 'smartctl' tells the shell to run the command from this directory, rather than searching the PATH for the 'smartctl' command
  4. To print all SMART data for a specific drive use the command: `sudo ./smartctl --all /dev/sdn` where /dev/sdn is the path to the block device.
  5. Optionally, this output can be saved to a file using the following: `sudo ./smartctl --all /dev/sdn > ~/smartdata.txt` for detailed examination