Hi.
How do I determine the number of physical processors installed on my server from within the OS?
I used to trust /proc/cpuinfo till I came across a Xeon box which had four physical CPUs, but /proc/cpuinfo reported eight. Talk of multithreading! Surely there must be a way to find the correct number of physical CPUs? Something like.. No of CPUs: 8 ( 4 Physical )
Regards, NMK.
Nadeem,
How do I determine the number of physical processors installed on my server from within the OS? I used to trust /proc/cpuinfo till I came across a Xeon box which had four physical CPUs, but /proc/cpuinfo reported eight. Talk of multithreading! Surely there must be a way to find the correct number of physical CPUs? Something like.. No of CPUs: 8 ( 4 Physical )
You can trust /proc/cpuinfo now too. For a standard Xeon proc, you shall see two CPUs in cpuinfo and for quad xeon processor you should be able to see 8 CPUs (and yes thats due to hyper threading)
Thanks & Regards, Mitul Limbani, Founder & CEO, Enterux Solutions, The Enterprise Linux Company (TM), www.enterux.com
Hi Nadeem,
On Thu, 13 Apr 2006 16:02:08 +0530, "Nadeem M. Khan" nadeem.m.khan@gmail.com said:
Hi.
How do I determine the number of physical processors installed on my server from within the OS?
[snip]
Surely there must be a way to find the correct number of physical CPUs? Something like.. No of CPUs: 8 ( 4 Physical )
You might want to use ``lshw'' [0] Just apt-get it in debian. This is what it gives on my hyperthreading processor:
*-cpu product: Intel(R) Pentium(R) 4 CPU 3.20GHz physical id: 1 bus info: cpu@0 [snip] configuration: id=1 *-logicalcpu:0 description: Logical CPU physical id: 1.1 width: 32 bits capabilities: logical *-logicalcpu:1 description: Logical CPU physical id: 1.2 width: 32 bits capabilities: logical
And on a real SMP server it clearly shows *-cpu:0, *-cpu:1
[0] http://packages.debian.org/unstable/utils/lshw
Anurag