smartctl commands

3 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 3 shown

  • smartctl -t short /dev/sda && sleep 120 && smartctl -l selftest /dev/sda

    Start SMART short self-test then read its log; non-destructive background test

    disk · monitoring · troubleshooting

  • smartctl -A /dev/sda | awk '$1~/^[0-9]+$/{printf "%-3s %-24s raw=%s\n",$1,$2,$10}'

    Tabulate raw SMART attribute values; watch Reallocated_Sector_Ct and Pending

    disk · monitoring · troubleshooting

  • smartctl -x -d auto /dev/sda | less

    Full -x dump: health, attributes, error log, temp history; -d auto detects RAID/USB

    disk · troubleshooting · monitoring