3 ms·
Am I using the wrong command to count physical cores (I'm guessing so? grep 'model name' /proc/cpuinfo | wc -l What should I use to count physical cores?
by syedkarim 15y ago
Am I using the wrong command to count physical cores (I'm guessing so?
grep 'model name' /proc/cpuinfo | wc -l
What should I use to count physical cores?
- sciurus 15y ago`grep 'core id' /proc/cpuinfo | sort -u | wc -l` will work. See http://serverfault.com/questions/262867/how-to-find-out-if-my-debian-server-setup-is-a-dual-core-or-not/262876#262876 http://serverfault.com/questions/262867/how-to-find-out-if-m...
- mrich 15y ago/proc/cpuinfo are hyperthreaded cores, as exposed to the OS. For basically all the modern multi-core Intel Xeon CPUs you can divide that by 2. It seems you can also find out by looking at physical ID and "cpu cores". On a 64 (hyperthreaded) cores machine, I see physical ID 0..4 and cpu cores 8 in this case, which would mean 8*4=32.
- mrich 15y agosmall correction: "physical ID 0..3"