CentOS 7.x nproc
From Notes_Wiki
Home > CentOS > CentOS 7.x > Command line tools and utilities > CentOS 7.x nproc
It is possible to see CPU information using:
cat /proc/cpuinfo
In the output for every physical CPU (socket) there is a different physical ID. For every core in the processor there is a different core ID. If hyper-threading is enabled then each physical-ID / core-ID pair for hyper-threaded processor would appear twice.
To quickly determine no. of processor cores across all physical IDs, core IDs, threads, etc. use:
nproc
This will give value of <physical CPUs> x <cores per CPU> x <Threads per core> as a single number.
Home > CentOS > CentOS 7.x > Command line tools and utilities > CentOS 7.x nproc