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

Gilbert E. Detillieux gedetil at cs.umanitoba.ca
Thu Apr 17 15:13:34 CDT 2014

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 one
> 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

More information about the Roundtable mailing list