Leopard and kvm_open*()
Leopard and kvm_open*()
- Subject: Leopard and kvm_open*()
- From: Steve Thompson <email@hidden>
- Date: Fri, 30 Nov 2007 13:45:14 -0500 (EST)
Hi all,
I conducted some dialog with this list on this subject back in January
2007, but now that Leopard is here I have some additional questions.
I have written a batch processing engine. Imagine the situation where a
daemon launches a shell script on behalf of another user. We have no
control over what that shell does; all we know is the name of the shell
and its script content. However, we need to know periodically, while the
top-level shell is still running, what its CPU total usage is so that we
can report back to the user on the progress of the job, and can perhaps
enforce a CPU time limit. All I know about the running shell is the PID
of the top-level process; by doing a sysctl(CTL_KERN, KERN_PROC,
KERN_PROC_ALL) I can trace through the process relationships and work out
the total resource consumption, but only if I can get the CPU used by
terminated children of an arbitrary PID via the proc->p_stats->p_cru
fields. Right now (on Tiger) I am doing a kvm_read() to get this
information, but in Leopard this is no longer possible I assume.
I'd appreciate some pointers about how I might get at the p_cru info on
Leopard. TIA,
Steve
_______________________________________________
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