2

I'm looking on the 'safe' Cflags on the Gentoo Wiki, and I want to figure out how to see which CPU is on a specific machine.

On Gentoo I see you can get this with

cat /proc/cpuinfo

but on Mac I get

No such file or directory

What is the equivalent for OS X?

LаngLаngС
  • 8,279
Marius Butuc
  • 4,192

2 Answers2

4

From terminal, you'll want to start with system_profiler

 system_profiler SPHardwareDataType

Also, much more data is available from ioreg but you'll need to parse the output (which can arrive as XML if you prefer) to get things like actual bus and clock frequency of each core.

bmike
  • 235,889
4

On the other hand, if you don't want processor name, speed, the number of processors, etc but you're interested in the model number, you might want to give sysctl -n machdep.cpu.brand_string a try, eg.

$ sysctl -n machdep.cpu.brand_string
Intel(R) Core(TM)2 Duo CPU     E7600  @ 3.06GHz
Marius Butuc
  • 4,192