title: How to get CPU temperature and fan speed on OS X?
body: <p>How do I get CPU temperature and fan speeds in OS&nbsp;X?</p>
  
  <p>I understand that information is obtained from <code>IOHWSensor</code> in <code>IOKit</code>, but I'm unable to find any reliable information on how to exactly do that.</p>
  
  <p>I've found an article with a sample program - <a href="http://www.booktou.com/node/148/0321278542/ch10lev1sec7.html" rel="nofollow noreferrer">http://www.booktou.com/node/148/0321278542/ch10lev1sec7.html</a>, but all I get with it is the GPU temperature. I'm sure there are CPU temperature sensors on the unibody Macs, so that means I'm doing something wrong.</p>