title: Programmatically get processor details from Mac OS X
body: <p>My application running on Mac OS X that needs to retrieve details about the machine it is running on to report for system information.  One of the items I need is details about the processor(s) installed in the computer.</p>
  
  <p>My code currently works, but is far from an ideal solution, in fact I consider it a bad solution, but I have had no luck in finding a better one.</p>
  
  <p>The information I report currently and after some formatting looks like:</p>
  
  <blockquote>
    <p>Processor: Intel Core 2 Duo 2.1 GHz, Family 6 Model 23 Stepping 6</p>
  </blockquote>
  
  <p>All of the info I get is through command-line utilities called from a popen(). The readable part of the processor description is taken from the "system_profiler" command output and the Family, Model, and Stepping values are taken from the "sysctl" command.</p>
  
  <p>These command-line utilities must be getting there information from somewhere.  <strong>I'm wondering if there is an programmatic interface available to get this same info?</strong></p>
  
  <hr>
  
  <p>Related:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/821133/how-can-display-driver-version-be-obtained-on-the-mac">How can display driver version be obtained on the Mac?</a></li>
  </ul>