On Mon, Aug 20, 2007 at 07:37:15AM -0700, Jordan K. Hubbard wrote:
I also don't think it's really even worth exploring a port of Linux's htop unless you just want to steal the front end of it and rewrite everything else. The statistics gathering methodology is just too different on the two platforms. Linux uses procfs, as you've already determined, and Mac OS X uses a combination of sysctls, private API and .. other stuff .. for grabbing information out of Mach and the variety of other places we've squirreled it.
That's my experience as well. A year back or so, when I had too much time on my hands, I tried myself at top. I found I had to poke in various strange places to gather all process info, and that some fields exist in one OS but not the other. I am not sure what would be easier: re-write the bottom layer of htop, or add interactivity to Mac OS X's top. A.