[Gllug] Dual core
Daniel P. Berrange
dan at berrange.com
Tue May 15 08:03:41 UTC 2007
On Tue, May 15, 2007 at 02:17:30PM +0100, Yashpal Nagar wrote:
> Hi!
>
> How do we figure out if the CPU is dual core? i am running RHEL 3/4 and
> SUSE 10.
> I have used lshw, /proc/cpuinfo but none of them tell this arch of CPU.
The cpuinfo file has a 'physical id' field which refers to the physical
socket the logical CPU is in. So if two CPUs have same physical ID, then
are a pair of cores in the same socket.
eg
$ grep -E '(processor|physical)' /proc/cpuinfo
processor : 0
physical id : 0
processor : 1
physical id : 0
...Shows a single physical CPU, with two cores
# grep -E '^(processor|physical)' /proc/cpuinfo
processor : 0
physical id : 0
processor : 1
physical id : 3
processor : 2
physical id : 0
processor : 3
physical id : 3
...shows a pair of physical CPUs, each with two cores.
NB, I'm ignoring hyperthreading here which would also show us as two
cpus with same physical id - you'd need other heuristics to distinguish
a pair of cores, from a pair of hyperthreads.
Dan.
--
|=- GPG key: http://www.berrange.com/~dan/gpgkey.txt -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- berrange at redhat.com - Daniel Berrange - dan at berrange.com -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20070515/abce4fb7/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list