Non-priv way to collect job stats under Intel?
Non-priv way to collect job stats under Intel?
- Subject: Non-priv way to collect job stats under Intel?
- From: Jeffrey Johnson <email@hidden>
- Date: Mon, 31 Jul 2006 18:19:18 -0400
Hello,
We're making a universal binary of an app that calls task_for_pid() on PPC to gather cputime
statistics on demand for its child processes and displays the stats in a window in a ps-like
fashion. (We retrieved the source for ps and found the task_for_pid() call).
Alas, task_for_pid has gone privileged on Intel, and since ps is SUID root, I assume ps is still
using task_for_pid. But we can't, since we're not (and don't want to be) run as root.
Is there another non-privileged, reasonably cheap way to collect cputime stats for our child
processes that are still running without resorting to shelling out/popen()ing ps? We only care about
processes owned by our UID. Wait4() is too late, because we want incremental stats, not just the
ending stats. Our users are used to watching "das blinkenlights" :-).
Thanks
Jeffrey Johnson
Macintosh Development
Wavefunction, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden