Get Number of CPU in OS X (or FreeBSD)
Posted:
Tuesday, April 28th, 2015Last modified:
Tuesday, April 28th, 2015Get the number of CPUs in Mac OS X
This will be double your physical CPU if hyperthreading is enabled (it probably is).
$ sysctl -n hw.ncpu 8
Get the number of physical CPUs
$ sysctl -n hw.physicalcpu 4
Get the number of logical CPUs
$ sysctl -n hw.logicalcpu 8
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.