Re: looking for System APIs for load monitoring
Re: looking for System APIs for load monitoring
- Subject: Re: looking for System APIs for load monitoring
- From: Mike Abdullah <email@hidden>
- Date: Mon, 17 Aug 2009 12:34:08 +0100
If you can design to its paradigm, NSOperationQueue is almost exactly
what you want. By default it will dynamically adjust the number of
running operations to match the system load. Also, read up on Grand
Central Dispatch which is coming in Snow Leopard.
Mike.
On 17 Aug 2009, at 12:13, Marc Lohse wrote:
I am developing an application that needs to monitor the system's
CPU and IO load while it's running to be able to identify a low
system load and only do it's resource-hungry work while the system
is not busy doing other things. I've been searching for the low-level
system API that would give me access to this kind of information but
i have not yet found exactly what i need - functions like
host_processor_info supply the overall CPU usage which is nice, but
i need
to know the CPU usage of each individual process. The kind of
information i
need is essentially what's supplied by the ps -axv command. But i
don't want
to solve my problem by calling ps as an external task - i am sure
there is
a more elegant way to get the info directly. Could anybody help me by
pointing me to some source of documentation (maybe i am stupid or
looking in
the wrong place but i did not find the info in the documentation
supplied
with Xcode) and/or maybe some code examples.
thanks a lot
P.S.: My apologies if this question is not exactly Cocoa-related...
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden