Determine which process is responsible for waking a disk
While adding such functionality is infeasible given the App Store policy regarding administrator privileges, it is still possible to monitor disk activity using
fs_usage via the Terminal.
After executing it with administrator privileges,
fs_usage displays all file activity for all processes.
grep, the output can be filtered to display only the file path of interest.
For example, to monitor activity for an external device named "My External":
sudo fs_usage | grep /Volumes/My\ External
NOTE: All spaces must be preceded with a backslash (
My\ External rather than just
Once executed, the fs_usage command returns activity as it happens.
As a process accesses the specified device, five columns of information are returned, only three of which are mainly of interest:
/Volume/My External/install.img), and the fifth column shows the process that accessed it (