nproc

print the number of processing units available

cat /proc/cpuinfo

  • Physical id and core id are not necessarily consecutive but they are unique. Any cpu with the same core id are threads in the same core.

  • Any cpu with the same physical id are threads or cores in the same physical socket.