Getting System Information

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

  1. macrumors regular

    Joined:
    Dec 22, 2006
    #1
    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

    Joined:
    Oct 13, 2008
    Location:
    Achewood, CA
    #2
    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

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
  4. Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    Free space stuff can be done with Cocoa. The other things probably already have code examples on cocoadev.com - search there.
     

Share This Page