title: Getting CPU,RAM info using IOKit in swift
body: <p>I need to get information about CPU, RAM, Battery usage in mac application.</p>
  
  <p>I can get all those information by using <code>vm_stat</code>,<code>top</code>,<code>system_profiler</code> using <code>NSTask</code>.</p>
  
  <p>But I can't use those if I enable sandbox.</p>
  
  <p>I can't find anything because the documentation for that is very poor(or I didn't find anything I guess).</p>
  
  <p>So, what are the functions I can use to get the info about the system? Like using <a href="https://developer.apple.com/library/mac/documentation/IOKit/Reference/IOPowerSources_header_reference/" rel="nofollow"><code>IOPowerSources.h</code></a> I can get information about the Battery.</p>
  
  <p>Can anyone guide me?</p>
  
  <p>Thanks!</p>