LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Hyperthreading question

[ILUG] Hyperthreading question

Pádraig Brady P at draigBrady.com
Tue Feb 9 11:54:30 GMT 2010


On 09/02/10 11:32, Robert Sweetnam wrote:
> On 09/02/2010 11:34, Oliver Pfaff wrote:
>> Hi,
>>
>> At OS level on Linux, without installing an extra program, is it possible
>> to identify whether hyperthreading is activated on a Xeon CPU without
>> knowledge about the CPU design or hardware?
>>
>> Regards,
>>
>> Oliver.
>>
>
> Hi,
>
> cat /proc/cpuinfo
>
> Look for 'ht' in the flags.

Nope, that just means it has certain instructions available.
You could determine from counts in /proc/cpuinfo I suppose:

cores=$(grep "core id" /proc/cpuinfo | sort -u | wc -l)
cpus=$(grep "processor" /proc/cpuinfo | sort -u | wc -l)
[ $cpus -eq $cores ] || ht=1

BTW there is a new `nproc` utility included now with coreutils
which counts the number of processors taking into account those
brought offline on the system, or those not made available to
the process with taskset.

Also I notice http://www.codemonkey.org.uk/projects/x86info/
has recently been updated to output cpu topology info.

cheers,
Pádraig.


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell