Showing posts with label commands. Show all posts
Showing posts with label commands. Show all posts

Thursday, November 29, 2012

Getting CPU info from the command line in OSX

Ever wonder what processor your mac is running and what features it has? Apple usually doesn't disclose the processor model name. Rather, they simply tell you it is a quad core i7 or dual core i5.


For example, does it support VT-d/VT-x? Well, in the command line, you can find out what processor it has and look it up on Intel's ark site.


For example, if you had an i7 3770k, you could go and get the full specs at by googling "ark 3770k" which gives you a link to the specs at : http://ark.intel.com/products/65523

In linux you can cat /proc/cpuinfo.

Well, I will show you the OSX equivalents. Instead of cpuinfo, we have sysctl To get the model name
in Linux In linux:
 grep "model name" /proc/cpuinfo 

In OSX, it is:
 sysctl -n machdep.cpu.brand_string 


To get full CPU info Linux:
 cat /proc/cpuinfo 
OSX:
 sysctl -a | grep machdep.cpu 


Want to know the core count and threads, you do another pipe grep. In OSX:

 sysctl -a | grep machdep.cpu | grep core_count 
 sysctl -a | grep machdep.cpu | grep thread_count 


Here is a full example:


Subscribe to: Comments (Atom)

AltStyle によって変換されたページ (->オリジナル) /