Updated: 28 September 2026 · Applies to: smartmontools 7.2 to 7.4 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13 (physical servers)

smartctl reads the S.M.A.R.T. health data that hard disks and SSDs keep about themselves, and starts their built-in self-tests. It comes in the smartmontools package, which is in the main repositories of every current distribution. It needs direct access to the drives, so it is for dedicated servers; on a VPS the disk is virtual and has no S.M.A.R.T. data.

Install

dnf install smartmontools     # AlmaLinux, Rocky Linux, RHEL
apt install smartmontools     # Ubuntu, Debian
smartctl --version

Find the drives

smartctl --scan

This lists each drive with the device type smartctl will use, for example /dev/sda -d scsi or /dev/nvme0 -d nvme.

Everyday commands

smartctl -i /dev/sda          # model, serial number, firmware, whether SMART is enabled
smartctl -H /dev/sda          # overall health: PASSED or FAILED
smartctl -A /dev/sda          # attributes (SATA) or health log (NVMe)
smartctl -a /dev/nvme0        # everything, for an NVMe drive
smartctl -t short /dev/sda    # start a short self-test (about 2 minutes)
smartctl -l selftest /dev/sda # self-test results

Drives behind a RAID controller

Hardware RAID controllers hide the physical drives. Add the controller type and the drive number:

smartctl -a -d megaraid,0 /dev/sda     # Broadcom/LSI MegaRAID, drive 0
smartctl -a -d cciss,0 /dev/sg0        # HPE Smart Array

smartctl --scan often lists these devices with the right -d option already.

What to look for

  • SATA and SAS: Reallocated_Sector_Ct, Current_Pending_Sector and Offline_Uncorrectable should be 0.
  • NVMe: Critical Warning 0x00, and watch Percentage Used (wear) and Media and Data Integrity Errors.

For automatic monitoring and email alerts, see how to monitor disk health with smartd.

Official documentation: smartmontools project.

Ucartz services for this topic

Was this answer helpful? 3 Users Found This Useful (3 Votes)