[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...
http://www.itworld.com/operating-systems/340223/counting-processors-your-linux-box?source=ITWNLE_nlt_linux_2013-02-05
A quick Google search also came up with many articles and forum posts on
the topic, some more vague and general than others...
http://www.richweb.com/cpu_info
https://www.ibm.com/developerworks/community/blogs/brian/entry/linux_show_the_number_of_cpu_cores_on_your_system17?lang=en
http://heidydogdog.appspot.com/?p=105001
https://access.redhat.com/site/discussions/480953
http://www.linuxforums.org/forum/red-hat-fedora-linux/180236-how-do-i-get-physical-cpu-socket-count-rhel.html
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