How to tell whether a drive is asleep

hard drivepower-managementsleep-wake

Is there an application or command-line utility for Mac OS X to query a hard-disk to see if it is 'asleep' or 'awake' right now? (i.e. as controlled by Energy Saver / pmset disk sleeping preferences). Note that I'm after the current sleep state, not just whether the system will put the disk to sleep when its idle.

I have two hard drives in my MacBook Pro, an SSD for the System and a much larger "regular" mechanical drive for various large files I don't often use.

I'd like the physical drive to be put to sleep when not in use, and in general stay asleep unless I'm actually using it. I'd like this to be automatic, rather than mounting and unmounting the drive on a regular basis.

I've set up Energy Saver to put the disk to sleep, but I can't actually tell when the drive is asleep or awake (even pressing my ear against the laptop its hard to tell what's fan noise vs disk noise), so I don't know if I've appropriately divided my files between the two drives.

Is there some way of querying the drive to see if it's asleep, without actually waking it, so I can monitor this to see if its generally asleep or not?

I guess an alternate, equivalent question is, What is the Mac OS X equivalent of the Linux command:

hdparm -C <device>

Note: It need not be an exact, command-line equivalent. Any means of finding out would be useful.


Some places I've looked so far, without success:

  • The built-in Disk Utility and System Information applications don't seem to provide any information on sleep/wake state of drives.
  • pmset -g (built-in command) offers various query functions, but the events seem to be about the system sleep events, not disks.
  • smartctl -i -n sleep (smartmontools via MacPorts) seems to always think all drives are asleep for me! (would be interesting to hear if this is true for others)

Best Answer

No, there isn't any utility or tool to find out this kind of information.

ps. I'm posting this as an answer, because I have researched this question few months back and I'll be more than happy if someone proves me wrong.

Edit: Seems to be the same conclusion as the developers of SmartMonTools based on their response to this issue, in which they claim the SmartMonTools' output of drives always sleeping is a bug, and have now corrected it to note that Power Mode is not available on Mac OS X / Darwin.