28

I'd like to identify which CPU this notebook is using, in terms of code names such as "Ivy Bridge" and "Haswell". The little Apple logo in the upper left shows some information, but not this.

  • 2
    Well, so far none of the answers tell me for certain what my processor is, other than a code number. Even looking up the processor at Intel doesn't give the 'family'. Only Mactracker & Everymac even have a guess, & between them it could be any of 5... or not, because my actual CPU was never sold in a new Mac - Intel(R) Xeon® CPU X5690 @ 3.47GHz – Tetsujin May 19 '16 at 7:03
  • 2
    @Tetsujin: google x5690 wikipedia and you'll see that it's a Westmere microarchitecture CPU. (die shrink of Nehalem with identical performance, but did add the AES new instructions, and carryless-multiply for crypto). – Peter Cordes May 19 '16 at 14:10
  • 2
    @PeterCordes - for sure. I did actually know it is a Westmere machine, but my main point was that none of the answers so far would tell me that without a little Google-Fu of my own, so don't actually answer the OP's question, per se. – Tetsujin May 19 '16 at 14:28
  • 1
    @Tetsujin: good point; this is one of those cases where people that know the answer forget that it's not obvious to people that don't. I added an answer that covers step 2. – Peter Cordes May 19 '16 at 15:15
  • & an excellent answer it is too. – Tetsujin May 19 '16 at 15:27
39

First off, you are not going to get the processor microarchitecture name (Broadwell, Sandy Lake, Ivy Bridge, etc.) because it's not a prominent branding scheme for the Intel processors. Contrast that with Apple, the marketing department chooses to actively market the code names of their operatings systems (Mavericks, Yosemite, El Capitan). It's a marketing convention, not a technical one.

For a list of all Intel Processors and their codenames, architectures and specs, Wikipedia's List of Intel Microprocessors has a good page.

So, to answer this question, I am going to provide three methods to find out what CPU you have, the first two, which should be good for most users, and a third method in which you can determine the microarchitecture number so you can look it up on Intel's support site. You can "jump" to the section that applies to you.

  1. About this Mac (general CPU info)
  2. System Profiler (general CPU info)
  3. Terminal (detailed CPU info)


About this Mac

Clicking on the Apple symbol at the top of your screen, select About this Mac

enter image description here

You will get a screen that gives you an overview of your system. Your processor will be listed here.

enter image description here


System Profiler

Clicking on the button marked System Report... (green arrow) you get a complete profile of your system. On the first page, it will give you more detailed info about your machine, including processor info

enter image description here

Terminal

I am a fan of Terminal in general. Pretty much everything you see in the GUI in OS X can be accessed quicker and more accurately through the command line, IMHO.

To get the exact CPU model including the microarchitecture number, in Terminal, execute the following command:

sysctl -n machdep.cpu.brand_string

You will get the exact processor that you are using. For instance, on my iMac, it the command above responds with:

Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

You can then do a search for i7-3770 and pull up the code name and specs.

Just for reference, you can use the Terminal command:

system_profiler SPHardwareDataType

and get a result that looks just like the screen that I posted in the second section, System Profiler:

Hardware Overview:

  Model Name: iMac
  Model Identifier: iMac13,2
  Processor Name: Intel Core i7
  Processor Speed: 3.4 GHz
  Number of Processors: 1
  Total Number of Cores: 4
  L2 Cache (per Core): 256 KB
  L3 Cache: 8 MB
  Memory: 32 GB
  Boot ROM Version: IM131.010A.B09
  SMC Version (system): 2.11f14
  Serial Number (system): XXXXXXXXXXXXXXXXXXX
  Hardware UUID: XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX

(Credit to dante12 below)

So, if you needed your CPU or more commonly, your Model Identifier, you can use the same command coupled with grep.

system_profiler SPHardwareDataType | grep Identifier

It responds back with

  Model Identifier: iMac13,2
  • 11
    Out of all the options you provide, only the Terminal method will actually tell you the architecture as requested in the question, unless I'm missing something. – Bob May 19 '16 at 5:21
  • 3
    @Bob Unless I am missing something, I can't seem to spot the architecture in either option. (except that ark.intel.com is able to tell me that after looking up i7-3770) – Num Lock May 19 '16 at 7:14
  • 4
    @NumLock Oh, not having the architecture name is to be expected (I don't think the CPU actually reports as the code name, so the OS would have to keep an up-to-date database...). The model number is enough to easily and uniquely identify the architecture, so IMO that counts. But the non-Terminal options here don't even provide the model number; trying to guess which CPU it is (and its performance, efficiency, etc.) by just the core count and clock speed (is it base clock or max turbo boost?) is inaccurate and generally a bad idea. – Bob May 19 '16 at 7:19
  • 1
    The terminal option is the only useful thing in this answer. If I asked someone what CPU they were testing on, and they said "Core i7", all I'd know is that it was a Nehalem (2008) or newer. There are huge differences between Nehalem and Sandybridge, and important differences from SnB to Haswell to Skylake. You should remove the other options to not encourage people to give useless answers when people ask them what microarchitecture their CPU has. The model number is great, because you can tell at a glance from the first digit what microarch it is, or google for full details. – Peter Cordes May 19 '16 at 13:57
  • 4
    You still suggest two useless methods that don't tell you the model number, only "i7", and you suggest them first. You don't make it clear that the terminal way is the only one that lets you answer the OP's question. The "About" and "System Profiler" stuff appears to be just a waste of time. Even worse, the red arrow pointing at "processor info" implies that "Core i7" is a valid answer to the "what microarchitecture do I have" question. It's too bad there isn't a GUI way that gives a satisfactory answer, but there isn't. – Peter Cordes May 19 '16 at 16:22
10

Open Terminal and type or copy and paste the following command(s)

system_profiler SPHardwareDataType | grep Processor

or

system_profiler SPHardwareDataType

or

sysctl -n machdep.cpu.brand_string
sysctl -a | grep cpu

Also, I've found a nice script on Github (Thanks to @rbanffy):

open http://www.google.com/?q=$(sysctl -n machdep.cpu.brand_string 
                              | awk '{FS=" " ; print $2 "+" $3 "+" $4}')+site:ark.intel.com
  • Thanks you, $ sysctl -a | grep \.features\: | fmt -w 48 command has helped me for CPU flags output. – pacify Jun 10 at 15:47
5

The CPU has its own model number string built in. Software can run the CPUID instruction with the right parameters to copy the string into registers. The string will be something like "Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz". You can get it from the command-line with

sysctl -n machdep.cpu.brand_string

I don't actually know OS X. I'm answering this as someone who is often frustrated by benchmark numbers in SO answers that don't mention the hardware. On Linux, some distros ship lscpu and/or x86info, but neither of them decode the model number into an Intel code-name either. The numbers follow a pattern, so it's fairly easy to decode (see below).

None of the existing answers have mentioned any GUI method that gives the model number. All the GUI methods just show you "Core i7", which is nowhere near sufficient. Please don't tell people you have "a core i7", because that just wastes everyone's time.

"i7" could be anything from Nehalem to Skylake. There are huge differences between Nehalem and Sandybridge, and important differences from SnB to Haswell to Skylake.


If someone asks you what microarchitecture you ran your benchmark on, the model string from that is a great reply containing more information than just the microarchitecture name, so just copy&paste it to them (e.g. "i7-3770 CPU @ 3.40GHz").

Most people who ask you that will know how to decode model numbers, so don't feel like you need to summarize it or look it up for them. I'd much rather someone copy/pasted the exact model number, since I can google it to find out details like cache size. (http://ark.intel.com/ has a page for each model, and those usually come up high in google's search results. However, those don't use the codenames).

There are "Pentium" and "Celeron" models of each microarchitecture, but they have AVX disabled so people only use them for ultra-budget machines.

The "i7 extreme" CPUs are an exception to this. e.g. i7-5960X is still Haswell, but is 8 core (16 hyperthreads) with quad-channel memory. IDK if Apple sells any machines with such CPUs.

Wikipedia has excellent tables of model numbers for each microarchitecture. e.g. you can google x5690 wikipedia to quickly find that a Xeon X5690 is a Westmere architecture processor.


To learn more about the differences between the pipelines of various microarchitectures, see articles like this Ars Technica one about Haswell. Even the Wikipedia articles are not bad.

For a more technical CPU architecture point of view, see David Kanter's excellent Sandybridge and Haswell writeups.

Agner Fog's microarchitecture PDF is excellent if you're analyzing / tuning assembly language (or compiler output), e.g. trying to make sense of perf counters.

Intel's and AMD's optimization manuals also have some microarchitectural details, but don't always explain their asm optimization suggestions with analysis of how the microarchitecture operates. This is why I prefer Agner Fog's guide.

Also see the Stackoverflow x86 tag wiki, which I've expanded/improved a lot in the past year.

  • 1
    Also more (slightly outdated) info here. You can probably get the family/model/stepping numbers with sysctl but I don't have a Mac to try that on. – Bob May 20 '16 at 10:41
2

gcc or clang -march=native can print a code-name for you, because the names of the tuning options match Intel's uarch codenames (e.g. -march=sandybridge). For AMD: -march=bdver2 = Piledriver = Bulldozer version 2.

clang-3.5 -v -xc /dev/null -O3 -march=native -o- -E 2>&1 | grep -o 'target-cpu \w*'

On my Linux Core2 system prints: target-cpu core2. I assume it will do something similar on OS X.

gcc -v -xc /dev/null -O3 -march=native -o- -E 2>&1 | grep -o 'arch=\w*'

on my Linux Core2 system prints:

arch=native
arch=core2        <----- This one
arch=native

This command compiles /dev/null as C (-xc). gcc / clang -vprints its internal commands as it runs them, with full command line args. Even with-E(preprocessor-only), the-xcoption leads gcc to pass the full set of-march=whatever -mmmx -msse2 ...` options.

grep -o prints only the matching part of lines that match. \w* matches 0 or more word-characters.


You need a new enough version of clang or gcc to recognize your CPU's microarchitecture and map it to a code-name. An old gcc version will just print something like -march=core2 even for a Haswell, and -mtune=intel or something.

Another similar approach is to filter the asm output from gcc's -fverbose-asm, which includes the optimization options as comments. I don't know a clang equivalent for this.

gcc -xc /dev/null -O3 -fverbose-asm -march=native -o- -S | grep -o 'arch=\w*'

arch=core2

This works on a Haswell system: see this example on the Godbolt Compiler Explorer. Note the -march=haswell in the output.

  • Interesting and rather novel approach! Question: is gcc or clang something one would expect to find on a (non-programmer's) Mac? – Bob May 24 '16 at 3:00
  • @Bob: IDK, I don't even own a Mac! I got here from the "hot network questions" sidebar. Many Unix programs are distributed in source form, so some people will have a C compiler on their Mac, even if you don't program at all, or not in C. (Some perl modules come with C to be compiled, for example.) Anyway, this answer was mostly targeted at people that use gcc or clang on their Mac fairly regularly, but aren't Intel hardware experts. It's possible to be a programmer without being a hardware geek. – Peter Cordes May 24 '16 at 3:07
  • I think clang is only available after you installed xcode. Besdies it is sufficient to use clang instead of clang-3.5 – Anthony Kong Jun 5 '18 at 23:27
1

In the Apple menu (top left of your screen) select About This Mac. Then look for a button that says More Info, it will open a window with EVERYTHING about the mac including it's model number (MacBook Pro 12.3 for example) then use the MacTracker app mentioned above or just search on that name ant you will get that info.

1

Go to one of the Mac upgrade sites and enter your serial number/model number from About this Mac.

Example http://www.everymac.com/ultimate-mac-lookup/

Enter serial no.

Enter Catpcha information.

You'll get the summary specs

Click on Complete Mac specs.

And it will tell you the chips details (22nm Haswell i5 4250U) plus also comparisons to the prior and later models.

1

The best way I found to find out information about your CPU in an Apple computer is to run the MacCPUID utility by Intel. You can find it here.

0

There's an iOS and Mac app called Mactracker. It shows various pieces of info about Macs.

  • Not sure why this was downvoted. This is a free app and very helpful. Simply find the model, go to General tab, and it tells you exactly what you want. – Hefewe1zen May 26 '16 at 17:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .