↑ ↓ select, Enter open, Esc close

Show SMART attributes of a disk

Adjust the values, the command updates live
root@server
smartctl -A /dev/sda

Prints the drive’s attribute table. What matters is the RAW_VALUE column for Reallocated_Sector_Ct, Current_Pending_Sector and Offline_Uncorrectable: anything above 0, and especially rising values, is a reason to replace the disk. Power_On_Hours shows its age.

Note: For NVMe SSDs, smartctl -A prints a different list; the important values there are Percentage Used and Media and Data Integrity Errors. Package: apt install smartmontools.

Also searched as

  • show bad sectors
  • hard drive power on hours
  • read smart values

Related one-liners

All in System and hardware

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.