On Linux, the disk queue length can be calculated by analyzing iostat sources. It has an avgqu-sz column whose queue size is http://www.cyberciti.biz/tips/linux-disk-performance-monitoring-howto.html
However, on Mac OSX, I find nothing like this. The closest counters that he has are nanoseconds of read and write latency, however I donβt see how to get the length of the queue on disk from them (and all OSX counters set - https://developer.apple.com/library/mac/# documentation / Kernel / Reference / IOBlockStorageDriver_header_reference / Reference / reference.html )
In the dtrace script iopending , the disk queue length is sampled and a histogram is displayed.