check how many cores are being used linux code example Example: ubuntu check how many cores cat /proc/cpuinfo | grep processor | wc -l