• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Leopard and kvm_open*()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Darwin 9 vs IOPlatformPlugins
  • Next by Date: Missing function in PCSC winscard.h file on Leopard: SCardIsValidContext()
  • Previous by thread: Darwin 9 vs IOPlatformPlugins
  • Next by thread: Missing function in PCSC winscard.h file on Leopard: SCardIsValidContext()
  • Index(es):
    • Date
    • Thread