[olug] Determining cores and sockets on Linux...
Obi-Wan
obiwan at jedi.com
Thu Nov 20 22:52:39 UTC 2008
> Those two core lines should do the trick, I would think. Here's my
> dual-core Athlon64x2:
>
> # grep core /proc/cpuinfo
> core id : 0
> cpu cores : 2
> core id : 1
> cpu cores : 2
And in case I was two quick on the trigger and it wasn't obvious,
just count the number of "core id" lines to get the number of
course, and count the number of "core id : 0" lines to get the
number of sockets.
... then again, here's a Core 2 Duo E8400 at work:
$ grep core /proc/cpuinfo
core id : 255
cpu cores : 1
core id : 255
cpu cores : 1
Never mind.
--
Ben "Obi-Wan" Hollingsworth obiwan at jedi.com
The stuff of earth competes for the allegiance I owe only to the
Giver of all good things, so if I stand, let me stand on the
promise that You will pull me through. -- Rich Mullins
More information about the OLUG
mailing list