3

This question already has an answer here:

Linux has a command to retrieve detailed CPU information using cat /proc/cpuinfo. Using this command, users can get CPU and CPU's core information like below.

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 142
model name  : Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
stepping    : 9
cpu MHz     : 3096.000
cache size  : 4096 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good xtopology nonstop_tsc unfair_spinlock eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti retpoline fsgsbase avx2 invpcid rdseed flush_l1d
bogomips    : 6192.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 142
model name  : Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
stepping    : 9
cpu MHz     : 3096.000
cache size  : 4096 KB
physical id : 0
siblings    : 2
core id     : 1
cpu cores   : 2
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good xtopology nonstop_tsc unfair_spinlock eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti retpoline fsgsbase avx2 invpcid rdseed flush_l1d
bogomips    : 6192.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

Does macOS/OS X have a command to retrieve detailed CPU and CPU cores information equal to Linux /proc/cpuinfo? I really want to know a CLI command to retrieve the Mac's CPU core ID.

I tried sysctl machdep.cpu, but it didn't retrieve CPU core ID.

marked as duplicate by Allan, Glorfindel Mar 1 at 19:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

If you go to the Apple menu item and under that is the option "About This Mac". Select that and when the pane shown below appears notice the buttons on the bottom.

enter image description here

The pane itself gives you some info but click on the System Report button. This opens a large pane where you can select specfic items to get info about. Click on an item in the left part of the pane and it tells you info about that item.

enter image description here

10

The Terminal command sysctl might be what you're looking for, in particular sysctl -a | grep machdep.cpu:

[my_mac:~] admin% sysctl -a | grep machdep.cpu
machdep.cpu.max_basic: 22
machdep.cpu.max_ext: 2147483656
machdep.cpu.vendor: GenuineIntel
machdep.cpu.brand_string: Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
machdep.cpu.family: 6
machdep.cpu.model: 142
machdep.cpu.extmodel: 8
machdep.cpu.extfamily: 0
.
.
.

machdep.cpu.core_count: 2
machdep.cpu.thread_count: 4
machdep.cpu.tsc_ccc.numerator: 134
machdep.cpu.tsc_ccc.denominator: 2

Info gleaned from OSXDaily.

  • 1
    I think most people might be just looking for the number of cores. The lines you are looking for are machdep.cpu.core_count and machdep.cpu.thread_count. Note that the thread count might be greater than the core count. Look up "hyperthreading" for Intel CPUs and "simultaneous multithreading" for AMD. – John Red Sep 11 at 6:38

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