[olug] Determining cores and sockets on Linux...
Dan Linder
dan at linder.org
Fri Nov 21 03:41:13 UTC 2008
On Thu, Nov 20, 2008 at 5:15 PM, Obi-Wan <obiwan at jedi.com> wrote:
> I suppose the version of Linux you're running makes a big difference
> in what cpuinfo reports. The two problematic work machines I reported
> are running old (2.6.15) and ancient (2.4.32) kernels, respectively.
> If you're running new enough kernels, I still like my suggestion of
> just counting the "core id : 0" lines to compute sockets.
I'm still tracking it down, but it happens that the first test servers I
initially looked at didn't have usable /proc/cpuinfo data (a "Intel(R)
Xeon(TM) CPU 2.66GHz" and "Dual-Core AMD Opteron(tm) Processor 2210 EE").
But my other test servers gave me better data ("Intel(R) Pentium(R) 4 CPU
3.06GHz", "AMD Athlon(tm) 64 X2 Dual Core Processor 6000+", "AMD Phenom(tm)
9550 Quad-Core Processor", "Intel(R) Xeon(R) CPU 5150 @
2.66GHz", and "Intel(R) Xeon(R) CPU 5140 @ 2.33GHz"). From the /proc/cpu
output of these systems, it looks like I can compute #cores and #sockets
this way:
Num_Cores = Number of Unique "core id" entries.
Num_Sockets = Num_Cores / Number of Unique "physical id"
I'll keep working - this doesn't pertain to the first two systems I
mentioned, so I might have to make a small exceptions list.
...but I'm still open to others thoughts! :-)
Dan
--
"Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the
Satires of Juvenal
"I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
** *** ***** ******* *********** *************
More information about the OLUG
mailing list