Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

buckyballs

macrumors regular
Original poster
Dec 22, 2006
176
97
Is there any simple way using Cocoa to obtain data such as the current battery level, CPU/Memory usage, HDD space etc?
 

autorelease

macrumors regular
Oct 13, 2008
144
0
Achewood, CA
Is there any simple way using Cocoa to obtain data such as the current battery level, CPU/Memory usage, HDD space etc?

I'm pretty sure you have to ask the kernel, which means using the Mach API. Don't know of any Cocoa wrappers. You might want to try cracking open a widget like iStat Pro to see how it's done elsewhere.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Free space stuff can be done with Cocoa. The other things probably already have code examples on cocoadev.com - search there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.