number of cpu core check in linux code example Example: linux check cpu core lscpu #or cat /proc/cpuinfo