Updated: 18 October 2026 · Applies to: smartmontools 7.4 on Debian 13 and AlmaLinux 10.2, smartmontools 7.5 on Ubuntu 26.04 (dedicated servers and PCs with SATA, SAS or NVMe drives); Windows PowerShell commands according to Microsoft

To check the SMART status of a drive in Linux, run smartctl -H /dev/sda (or /dev/nvme0): PASSED is good, FAILED! means the drive has failed or, according to the smartctl manual, expects to fail within 24 hours. To watch drives all the time, let the smartd service check them every 30 minutes (its default interval), run self-tests on a schedule and email you when something changes. On Windows, run Get-PhysicalDisk in PowerShell and look at the HealthStatus column.

SMART needs a physical drive, so this is for dedicated servers and your own machines. A VPS has a virtual disk with no real SMART data: smartctl either finds nothing or shows values made up by the hypervisor (our lab disk below is such an emulated disk). The host's drives are monitored by the provider.

1. Check the SMART status now

  1. Install smartmontools: apt install smartmontools (Debian, Ubuntu) or dnf install smartmontools (AlmaLinux, Rocky Linux).
  2. Find the drives:
    # smartctl --scan-open
    /dev/sda -d sat # /dev/sda [SAT], ATA device
    /dev/nvme0 -d nvme # /dev/nvme0, NVMe device
  3. Overall health: smartctl -H /dev/sda
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
  4. All values: smartctl -a /dev/sda (SATA and SAS) or smartctl -a /dev/nvme0 (NVMe).

A drive can pass and still be wearing out, so read the values too. On SATA and SAS drives, Reallocated_Sector_Ct, Current_Pending_Sector and Offline_Uncorrectable should stay at 0; a rising UDMA_CRC_Error_Count usually points to a cable. On NVMe drives, check Critical Warning (0x00 is good), Percentage Used (wear), Available Spare and Media and Data Integrity Errors. More on reading the output in how to install and use smartctl, and SSD checks in how to check whether a disk is SSD or HDD.

2. Run a self-test

smartctl -c /dev/sda            # shows how long the short and extended tests take
smartctl -t short /dev/sda      # start a short test
smartctl -l selftest /dev/sda   # read the result when it is done

The drive runs the test itself while the server keeps working. Lab result:

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      4660         -

smartctl supports NVMe self-tests from version 7.4, if the drive does (our emulated NVMe drive answered Self-tests not supported).

3. Set up smartd for continuous monitoring

  1. Open the configuration file: /etc/smartd.conf on Debian and Ubuntu, /etc/smartmontools/smartd.conf on AlmaLinux and Rocky Linux.
  2. Put # in front of the existing DEVICESCAN line and add:
    DEVICESCAN -a -o on -S on -n standby,q -s (S/../.././02|L/../../6/03) -W 4,45,55 -m admin@example.com
  3. Test the file before starting the service. smartd -q onecheck registers the drives, checks them once and exits (lab output, shortened):
    Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
    Device: /dev/nvme0, is SMART capable. Adding to "monitor" list.
    Monitoring 1 ATA/SATA, 0 SCSI/SAS and 1 NVMe devices
    ...
    Started with '-q onecheck' option. All devices successfully checked once.
    smartd is exiting (exit status 0)
    A typing mistake stops it with exit status 2, for example Missing argument to -m Directive and Configuration file /etc/smartd.conf has fatal syntax errors.
  4. Start the service and enable it at boot: systemctl enable --now smartd on AlmaLinux and Rocky Linux. On Debian and Ubuntu the unit is smartmontools.service with smartd.service as an alias: systemctl enable --now smartmontools.
  5. After any change, restart the service and check its log: journalctl -u smartd -b (or -u smartmontools).

What the line does:

  • DEVICESCAN monitors every drive smartd finds; -a checks the health status, attributes, error and self-test logs, and pending and offline-uncorrectable sectors.
  • -o on and -S on switch on the drive's SMART automatic offline testing and attribute autosave when smartd starts. Drives without these features only get a note in the log.
  • -n standby,q skips a check when the disk is asleep, without logging it.
  • -s (S/../.././02|L/../../6/03) runs a short test every day at 02:00 and a long test every Saturday at 03:00. The pattern is type/month/day/weekday/hour, and smartd -q showtests lists the planned tests: for the next 90 days it counted 90 short and 13 long tests per drive. smartd schedules NVMe self-tests from smartmontools 7.5 (Ubuntu 26.04); with 7.4 (Debian 13, AlmaLinux 10.2) run them with smartctl.
  • -W 4,45,55 logs a change of 4 °C or more, logs a message at 45 °C and sends an email at 55 °C.
  • -m is the address for warnings.

Lab output for the temperature check (limits lowered on purpose):

Device: /dev/nvme0, Temperature 50 Celsius reached limit of 45 Celsius (Min/Max ??/50)
Device: /dev/sda [SAT], Temperature 31 Celsius reached critical limit of 30 Celsius (Min/Max ??/31)
Sending warning via <mail> to admin@example.com ...

4. Make sure the warnings reach you

  1. smartd sends warnings with the system mail command. Install it: apt install bsd-mailx (or mailutils) on Debian and Ubuntu, dnf install s-nail on AlmaLinux and Rocky Linux. The server also needs a working mail relay.
  2. Add -M test to the line and run smartd -q onecheck again: smartd sends one test message per drive. In our lab the message had the subject SMART error (EmailTest) detected on host: server1 and the text TEST EMAIL from smartd for device: /dev/sda [SAT].
  3. Remove -M test and restart the service.

The default lines of the distributions already send to root: Debian and Ubuntu through /usr/share/smartmontools/smartd-runner and the script /etc/smartmontools/run.d/10mail, AlmaLinux through /usr/libexec/smartmontools/smartdnotify, which also shows health and temperature warnings on logged-in terminals. If you prefer a chat or ticket system, use -M exec /path/to/script: smartd passes the details in variables such as SMARTD_DEVICE, SMARTD_FAILTYPE and SMARTD_SUBJECT.

5. Check SMART status on Windows

  • PowerShell: Get-PhysicalDisk lists each drive with its HealthStatus (Healthy, Warning, Unhealthy or Unknown, according to Microsoft).
  • Temperature, wear and error counters: Get-PhysicalDisk | Get-StorageReliabilityCounter | Format-List
  • smartmontools also runs on Windows. According to its manual, smartctl -a /dev/sda reads the first disk (PhysicalDrive0) and NVMe drives are /dev/nvme0; smartd install sets up smartd as a Windows service that reads smartd.conf from its program folder.

Common problems

  • "Unable to detect device type" or no drives found: the drives sit behind a hardware RAID controller. Name each one with the controller type, for example /dev/sda -d megaraid,0 -a -m admin@example.com, one line per drive.
  • "can't monitor Current_Pending_Sector count - no Attribute 197": the drive does not report that value. smartd monitors the rest.
  • No email: test the mail command on its own with echo test | mail -s test admin@example.com, then check the mail log.

Our unmanaged dedicated servers come with full root access and free IPMI KVM, so you can monitor the real drives. If smartctl shows reallocated or pending sectors on a Ucartz dedicated server, open a support ticket with the smartctl -a output so the drive can be checked. For FreeBSD, see how to check hard drive health on FreeBSD.

Official documentation: smartd.conf manual, smartctl manual and Get-PhysicalDisk (Microsoft).

Was this answer helpful?

Still stuck? Open a ticket