'Obtaining CPU descriptions on Mac OS X

I'd like to programmatically get the CPU descriptions on Mac OS X, which look something like this:

Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz
Intel(R) Xeon(R) CPU X5550 @ 2.67GHz

On Linux you can do grep "^model name" /proc/cpuinfo and on Windows you can look at the ProcessorNameString value in HKLM\Hardware\Description\System\CentralProcessor\0 in the registry, but how do you get that information on OS X?



Solution 1:[1]

Have a look at Link. There's a file in the downloaded source called processor_info.c (and a ton of other good stuff) that I'm pretty sure will give you this information.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Glorfindel