Mac OSX Terminal cmd/script to display HDD sectors pending allocation

I've been trying to find a way to get terminal to display results of a SMART status check in the terminal for a recovery drive I use.

The cmd diskutil info or diskutil info -plist / only say whether the drive is "Verified" or not.

I'm looking for a script (or a nudge in the right direction in terms of BSD cmds) that will spit out the information on sectors of the drive... Pending, Allocated, all that stuff.

Any ideas?


Solution 1:

All Disk Utility and diskutil ever show is “Not Supported”, “Verified”, or “Failing”; it is a simple summary of the SMART status.

The usual command-line tool for getting detailed SMART information is smartctl from the smartmontools suite. smartctl can display the SMART values and attributes for supported drives (i.e. internal drives, SMART does not seem to be supported over the generic USB and Firefire disk protocols). Smartmontools does not come bundled with Mac OS X, but it is available in MacPorts (package info), Homebrew (package info), and Fink (package info).

The GUI application SMARTReporter seems mostly to be a wrapper around smartctl.
A web search will probably turn up other GUIs.