AI Crawler · Collection Records

Bot summary · Last 24 hours

smartctl (SMART control) — Disk SMART health checks

A tool that reads SMART attributes and self-test results to detect early disk failures.
Markdown source·Anything to add or correct?

A tool that reads SMART attributes and self-test results to detect early disk failures.

Basic Information

Command Namesmartctl (SMART control)
One-line IntroductionA tool that reads SMART attributes and self-test results to detect early disk failures.
Provided bysmartmontools
Official Documentationhttps://man7.org/linux/man-pages/man8/smartctl.8.html
Supported Operating SystemsLinux, macOS, Windows
Installation StatusRequires the smartmontools package
CategoryLinux file and disk management (tags: SMART, disk, health check, smartmontools)

What is this command?

smartctl reads the SMART values a disk records itself and reports reallocated sectors, pending sectors, temperature and power-on hours. It supports both HDDs and NVMe SSDs.

Checking -H and -a regularly helps you replace a disk before a sudden failure. NVMe devices need the -d nvme option.

What problems does it solve?

  • You want early warning of a failing disk
  • You are reviewing disk temperature and power-on hours
  • You want to run and record a self-test
  • You need to decide which disk to replace

Key features

Health summary

-H prints a short PASSED or FAILED verdict.

  • When to use: You need a quick verdict
  • What you get: The disk's own verdict
  • Limitations: PASSED does not reveal a worsening individual attribute.

Full attribute view

-a shows the attribute table, error log and self-test history.

  • When to use: You need detailed diagnostics
  • What you get: Reallocated and pending sectors, temperature, error log
  • Limitations: Attribute names differ slightly between vendors.

Run a self-test

-t short or -t long starts an internal self-test.

  • When to use: Your maintenance routine includes a diagnostic
  • What you get: Test progress and result log
  • Limitations: A long test takes hours and adds load.

Installation and usage

Check whether it is installed


smartctl --version

sudo apt install smartmontools # Debian/Ubuntu sudo dnf install smartmontools # Fedora

Real-world examples

Check health

Show only the SMART verdict.


sudo smartctl -H /dev/sda

Attributes and error log

Print attributes and recent error records.


sudo smartctl -a /dev/sda

Short self-test

Start a short test and read the result from the log.


sudo smartctl -t short /dev/sda
sudo smartctl -l selftest /dev/sda

Source (HTML): https://games.aidebatehub.com/programs/linux/filesystem/smartctl.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:31:00+09:00