Tuesday 13 October 2015

Display Number of Processors in Linux

The below command spits the number of processors of Linux machine. In Linux, /proc/cpuinfo has all the processor information for all current processors in your machine.

cat /proc/cpuinfo | grep processor | wc -l

or

nproc

or

lscpu gathers cpu architecture information in human readable format

lscpu


No comments:

Post a Comment