site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com %cpu %mem command lim lstart nice ppid pri sl state time uid xstat To solve my immediate problem, I'd settle for I grabbed some source described here: http://ezine.daemonnews.org/200205/sysctl-netbsd.html -pmb _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl...
Assuming that you're willing to accept the stipulation that you can
only look at your own processes, what sorts of information about said
processes would you expect/want such an API to provide? To put it another way, if you could have your idea "process inspection API", what would might it look like? Ideally, given a pid, I'd like an API returning the following ps values in a struct: lstart state time xstat Does sysctl on kern.proc work for this? (See the example in the sysctl 3 man page.) I had to change some "struct proc" declarations to "struct extern_proc", but then it compiles. Running it against my local user didn't correctly sum up my CPU usage, but it did correctly count my processes. This email sent to site_archiver@lists.apple.com