Then there are the "smartmontools" which are written in a highly modular way, aiming for portability from the very beginning. The smartmontools deal with S.M.A.R.T. data, but adding some options to get/set APM (Advanced Power Management), AAM (Advanced Acoustic Management) and caching attributes would be very easy from a technical and coding standpoint. I am afraid, they just don't belong there. Otherwise someone would have done it long ago.
So I was back at square one today, wanting to mess around with my disks but not having a tool. So, I just wrote something.
Here are setapm.c and a corresponding setapm binary for s10u9 for configuring the APM feature attribute on disks and an almost identical setaam.c and setaam for setting the AAM feature attribute.
They are very minimalistic. They will not even read out the configureation values from the disk for you. You'll only be able to set them.
And this will only work on systems where the
Sorry for the nitpicking...
As I said, it's a hack. The copy-and-change-a-few-lines approach is not an academically endorsed method of creating software. But if it does the job, who cares?
Unfortunately my drives have no sensible APM settings. I'd rather like to set the standby timeout manually (like hdparm -S). Is this possible in current Solaris/illumos versions? If not, it would be really great if you could post the code of an utility which accomplishes that (if it's not too much work).
Thank you very much!