linux number of cpus code example
Example 1: chcek number of cpus available on linux machine
lscpu | egrep 'CPU\(s\)'
Example 2: linux check cpu core
lscpu
#or
cat /proc/cpuinfo
lscpu | egrep 'CPU\(s\)'
lscpu
#or
cat /proc/cpuinfo