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-lin... 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_th... 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-ph... Hope these help! -- Gilbert E. Detillieux E-mail: <gedetil@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