OS - Mac

How to check # of CPU on Mac

bailey.. 2018. 3. 9. 08:27

Mac OS does not support proc file system (/proc) as it is based on FreeBSD.

To check the number of CPU, the following commands can be used.

sysctl -n hw.ncpu
cs


This is equivalent to the logical CPU numbers as following.

sysctl -n hw.logicalcpu
cs


The number of physical CPU can be retrieved with the following command.

sysctl -n hw.physicalcpu
cs