Andrew Mercer
on this page
    sudo hdparm -I /dev/sda              # detailed identity and feature list (ATA drives)
    sudo hdparm -tT /dev/sda             # buffered disk reads (-t) and cached reads (-T)
    sudo hdparm -W /dev/sda              # show write cache setting
    sudo hdparm -B /dev/sda              # show APM (power management) level
    

    hdparm -tT is a crude read benchmark: repeat it a few times on an idle system. For realistic results use fio.

    Useful settings, applied only when you know why:

    sudo hdparm -S 241 /dev/sda          # spin down after 30 minutes idle (values 241-251 = units of 30 min)
    sudo hdparm -B 254 /dev/sda          # reduce head parking (fewer load cycles on laptop drives)
    

    hdparm also issues ATA Secure Erase (--security-erase), which needs the drive unfrozen and a temporary password, and can leave a drive locked if interrupted. Read the man page fully before using it, and prefer nvme format/blkdiscard for NVMe and SSD workflows. Health information lives in smartmontools.