Thursday, January 30, 2014

Number of CPU cores

If you need to know how many CPU cores your machine has try this:-

grep -E "core id|physical id" /proc/cpuinfo | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l


Number of sockets:-
grep "physical id" /proc/cpuinfo | sort | uniq | wc -l

No comments:

Post a Comment