chcek number of cpus available on linux machine

C++
lscpu

# Or
cat /proc/cpuinfo
lscpu | egrep 'CPU\(s\)'
Source

Also in C++: