[RndTbl] reliable way of counting real CPUs under Linux?

Grigory Shamov Grigory.Shamov at umanitoba.ca
Thu Apr 17 16:01:51 CDT 2014

Hi Gilbert,


There is a lot of advice there for sure. For example, The 'ht' flag is
always there on our AMD Opterons (Shaghais and Barcelonas), even they do
not have HT enabled. I'd think that 'ht' it is always there in any
SMP-enabled linux kernel?

Grigory Shamov

HPC Analyst, Westgrid/Compute Canada
E2-588 EITC Building, University of Manitoba
(204) 474-9625

On 14-04-17 3:13 PM, "Gilbert E. Detillieux" <gedetil at cs.umanitoba.ca>

>On 17/04/2014 2:39 PM, Grigory Shamov wrote:
>> Hi All,
>> What would be the subj? Suppose you have a PC. It can have Intel or AMD
>> CPUs. It can have HyperThreading on, and even enabled. And it can have
>> or two, or several sockets.
>> Would there be a universal method to count real physical cores? Say,
>> passing /proc/cpuinfo through a magic filter, and not failing on AMD
>> Opterons too?
>An IT World article from a year ago dealt with that sort of thing...
>A quick Google search also came up with many articles and forum posts on
>the topic, some more vague and general than others...
>Hope these help!
>Gilbert E. Detillieux		E-mail: <gedetil at muug.mb.ca>
>Manitoba UNIX User Group	Web:	http://www.muug.mb.ca/
>PO Box 130 St-Boniface		Phone:  (204)474-8161
>Winnipeg MB CANADA  R2H 3B4	Fax:    (204)474-7609
>Roundtable mailing list
>Roundtable at muug.mb.ca

More information about the Roundtable mailing list