Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rusage data for another process?



On Dec 10, 2007, at 3:14 PM, Steve Thompson wrote:
On Sun, 9 Dec 2007, Norm Green wrote:
Is there a way to get the data returned by getrusage() for another process?

I also need this functionality, as least insofar as the CPU usage fields are concerned.

Generally, there is no way to get this information for another process, unless it's your child process, and it has terminated, or unless it is for yourself.


The most correct approach is to ask the other process to make the call, and then tell you, simce time is not really accounted for all your threads until you make the call (the BSD getrusage() output is more or less synthetic).

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >rusage data for another process? (From: Norm Green <email@hidden>)
 >Re: rusage data for another process? (From: Steve Thompson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.