Re: e: TASK_BASIC_INFO question (Steve Thompson)
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Fri, 19 Jan 2007, Michael Smith wrote: This is a critical functionality for my application, so hopefully this will be fixed before /dev/kmem support goes away for good, otherwise I will not be able to continue to support OS X. Steve ---------------------------------------------------------------------------- Steve Thompson E-mail: smt@nospam.vgersoft.com Voyager Software LLC Web: http://www.vgersoft.com 39 Smugglers Path VSW Support: support@nospam.vgersoft.com Ithaca, NY 14850 "186,300 miles per second: it's not just a good idea, it's the law" ---------------------------------------------------------------------------- _______________________________________________ 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... [...] I'm not quite sure whether this is hyperbole or blackmail, but it seems a bit flat either way. Sorry, not intended as either. It meant simply that if I don't have the ability to get this information, the functionality of my application will be severely impacted. What are you trying to do? If you have a priori knowledge of these processes, you can wrap them and gather statistics on termination. If you know who they are but cannot be complicit in their invocation, you might consider the acct(2) facility and/or the use of the sa(8) utility. It's actually a component of 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 the input file. However, we need to know periodically, while the top-level shell is still running, what its resource usage is so that we can report back to the user on the progress of the job. 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 at the proc->p_stats->p_cru fields (and right now I am doing a kvm_read to get this). This application has been run on other platforms for several years, but only recently did I get a request to port it to OS X (Intel and ppc), so I am very new (4 days) to this sort of bsd programming. This email sent to site_archiver@lists.apple.com
participants (1)
-
Steve Thompson