Antonio Feijao, FeijaoUK, Antonio Cloud, Antonio AWS, Cisco, Linux, Networking, Security

How many CPUs or Logical CPUs are on my MacOS ?

Check below to find the answer

macOS:~$ sysctl hw.ncpu
hw.ncpu: 4   

Note that the number here might not match the number of cores with the command below

macOS:~$ system_profiler SPHardwareDataType

    Hardware Overview:
      Model Name: MacBook Pro
      Model Identifier: MacBookPro12,1
      Processor Name: Intel Core i7
      Processor Speed: 3.1 GHz
      Number of Processors: 1
      Total Number of Cores: 2  
      L2 Cache (per Core): x KB
      L3 Cache: x MB
      Memory: x GB
      Boot ROM Version: xxx
      SMC Version (system): xxx
      Serial Number (system): xxx
      Hardware UUID: xxx-xxx-xxx-xxx-xxx


You can confirm even further with the below commands

macOS:~$ sysctl hw.physicalcpu

hw.physicalcpu: 2

macOS:~$ sysctl hw.logicalcpu

hw.logicalcpu: 4

Conclusion on this example, 2 physical cores and each core has 2 virtual CPU (CPU Thread)

The picture below gives a brief idea of how 1 CPU with 2 Cores ( CPU Thread ) works


If you want to know more details about CPUs, follow the intel website links below

Extra command for you to explore on your own

sysctl hw


Pictures from website

Inspiration to write this article from this source page

All the best,



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.