Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
add comment

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
share|improve this answer
1  
Nice example of sysctl! –  bmike Mar 15 '13 at 22:07
    
Thanks @bmike, and nice example of speeding up and filtering through system_profiler, I might add! :) –  Marius Butuc Mar 15 '13 at 22:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.