check threads and cores linux code example
Example 1: ubuntu check how many cores
cat /proc/cpuinfo | grep processor | wc -l
Example 2: linux check cpu core
lscpu
#or
cat /proc/cpuinfo
cat /proc/cpuinfo | grep processor | wc -l
lscpu
#or
cat /proc/cpuinfo