Sunday, April 3. 2011
Set APM and AAM feature configuration attributes for disks on Solaris
Unfortunately, there is no "hdparm" utility for Solaris, as there is for GNU/Linux. I had a look at the sources and porting it to Solaris will require a considerable effort. It is not difficult, at least not for setting/getting the various attributes, it is just that "hdparm" was probably never written with portability to other operating systems in mind (no criticism!). A lot of #ifdefs will have to be added.
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 thesata/ahci sd driver is used, not the legacy ata/ cmdk driver, because for the latter the USCSI ioctl is not implemented.
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
(Page 1 of 1, totaling 2 entries)