1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Getting System Information

Discussion in 'Mac Programming' started by buckyballs, Mar 12, 2009.

  1. macrumors regular

    Is there any simple way using Cocoa to obtain data such as the current battery level, CPU/Memory usage, HDD space etc?
  2. macrumors regular

    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.
  3. macrumors 68040


  4. Moderator emeritus


    Free space stuff can be done with Cocoa. The other things probably already have code examples on cocoadev.com - search there.

Share This Page