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