Check CPU information on Linux, just like check memory by watching /proc/meminfo
1 | cat /proc/cpuinfo |
Count number of processing units
1 | cat /proc/cpuinfo | grep processor | wc -l |
To get actualy number of cores
1 | cat /proc/cpuinfo | grep 'core id' |
Note: The number of processors shown by
/proc/cpuinfo
might not be the actual number of cores on the processor. For example a processor with 2 cores and hyperthreading would be reported as a processor with 4 cores.