I've been writing a small utility to get per-process statistics on Mac OS X. It launches the processes it inspects.
One of the features I really want to include is momentary Net and Disk IO; unfortunately, the only way I've found to really get at this information is by making the application act as a DTrace consumer for specific PIDs. I say unfortunately because when DTrace becomes active, the system becomes measurably slower, and the inclusion of DTrace requires my utility run as root (which seems excessive, given that my process only need inspect all the processes it creates).
And really, DTrace just seems very heavy handed for information which I believe must exist elsewhere in the kernel. There's a Mac OS utility called iStatMenus which provides this information (and without the corresponding system wide performance hit) in a way that makes me think there is some means of accomplishing what I want; I've attempted to reach out to them to see if they would mind sharing, but so far have not received a response.
So, is there a low-impact, least-permissions way of getting Net and Disk performance counters for a given PID in Mac OS X? ( That is to say, not invoking DTrace )