Probably somewhere in hdparm or smartctl.

- - - Updated - - -

This might be useful: https://wiki.archlinux.org/index.php/hdparm