Re: # of Physical processors in a Unix system
- From: John Fusco <fusco_john@xxxxxxxxx>
- Date: Mon, 28 Aug 2006 15:11:21 GMT
pbaronia wrote:
Hi all, How do we find the number of physiscal processors in a linuxIt's a fuzzy line between multicore and multiprocessor thanks to things like Hyperthreads and shared caches. Sometimes you need to know where the cache is.
system. To be very specific I am NOT talking about the logical
processors.
regards, Prashant
Intel has app note AP-485, which tells you how to use the CPUID instruction to determine this.
http://www.intel.com/design/xeon/applnots/241618.htm
CPUID is an unprivileged instruction, but there is a Linux cpuid module that provides device nodes that let you read the output of the CPUID instruction: /dev/cpu/[01234]/cpuid. It might not be loaded by default, in which case you can do a 'modprobe cpuid' to bring it in.
Be warned, the app note is difficult to follow due to all the legacy baggage it documents. It claims that there is identification for unique caches, but I have yet to try it on Woodcrest.
I am just starting to look at this on Opteron, but naturally AMD chose to do something completely different as far as CPU identification.
Good luck.
John
.
- References:
- # of Physical processors in a Unix system
- From: pbaronia
- # of Physical processors in a Unix system
- Prev by Date: Re: # of Physical processors in a Unix system
- Next by Date: Re: # of Physical processors in a Unix system
- Previous by thread: Re: # of Physical processors in a Unix system
- Next by thread: Re: # of Physical processors in a Unix system
- Index(es):
Relevant Pages
|