11

On Linux, I can verify and change the low level parameters of my disk drive using hdparm. Is there an utility providing the same capabilities for OS X, or perhaps some other way of manipulating the parameters?

Anders

2
  • 1
    I kinda wish you did not accept an answer yet. It does not seems like there is an acceptable answer to your question given. I would also like to know about some low-level tools on OS X. (no offense to Graham Perrin intended) e.g. hdparm -r0 /dev/disk2s1 On FreeBSD there is atacontrol. Nov 23, 2015 at 15:58
  • 1
    @JonathanKomar perhaps smartctl? joernhees.de/blog/2011/09/16/… Jun 24, 2019 at 20:22

2 Answers 2

6

pmset

pmset can manipulate power management settings, for example:

sh-3.2$ pmset -g | grep disksleep
 disksleep            10
sh-3.2$ sudo pmset disksleep 0
Warning: Idle sleep timings for "Battery Power" may not behave as expected.
- Disk sleep should be non-zero whenever system sleep is non-zero.
sh-3.2$ pmset -g | grep disksleep
 disksleep            0
sh-3.2$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.8.2
BuildVersion:   12C60
sh-3.2$ 

pmset(1) OS X Manual Page

EFI and SATA

https://discussions.apple.com/message/11856660#11856660 (2010-07-07) reminds me:

… Engineering has provided the following information:

This behavior is not the result of OS level disk spindown commands. There is an EFI change for SATA bus speed; and the suggested workaround is to run hdapm to set a new power management level on the disk itself.

This isn't an OS power management behavior, it's a tricky interaction between device firmware and EFI's configuration of the SATA interface. We commission drives from our vendors with different behaviors than the drives available generally on the market, and that is why the generic replacement does not support the features as you expect. …

(Side note: an Apple Support Communities bug may cause the wrong set of messages to appear. If that bug bites, then instead browse to the 2010-07-07 point in the topic.)

hdapm

http://mckinlay.net.nz/hdapm/

A Mac OS X command line utility for setting the power management (APM) level for ATA hard drives.

It can be used to eliminate "chirping" or "clicking when idle" noises in some HDDs.

Compatibility

  • OS X 10.5 or higher.
  • ATA/SATA hard disk with APM support.
  • Does not work with external USB or Firewire drives. …

 

… (Aug 25, 2012) version 1.2. …

SpindownHD

From past use of tools from Apple Developer, I set aside a copy of SpindownHD.app 4.6.2 (227.9) Copyright © 2003-2005 Apple Computer, Inc., part of the old CHUD (Computer Hardware Understanding Developer) tools – apparently OK for polling. However: as some of the KEXTs from that period are incompatible with modern versions of the OS, I don't know whether it's sane to use this app for sleep settings (for all disks).

2012-10-26 screenshot of old SpindownHD.app

3

http://missig.org/julian/projects/macosx/

"diskutil - A whole set of utilities like fsck, fdisk, tune2fs, and hdparm combined."

http://en.wikipedia.org/wiki/Disk_Utility

"Disk Utility functions may also be accessed from the Mac OS X command line with the diskutil and hdiutil commands."

There seems to be no port of hdparm for OSX unfortunately.

4
  • 2
    Diskutil, though fairly comprehensive, does not allow the kind of low level access I'm looking for. Jul 14, 2009 at 10:05
  • What specifically do you need?
    – Karolis T.
    Jul 14, 2009 at 10:45
  • 2
    In this case I'm looking to disable NCQ and the disk write cache. Jul 14, 2009 at 16:59
  • 1
    @Anders did you find anything? I'm looking to disable automatic fsck.
    – Chris
    Mar 11, 2016 at 22:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .