LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2008, 11:11 AM   #1
kkoene
Member
 
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Rep: Reputation: 0
Is my cpu hyper-threaded or dual core?


I apologize upfront if this was covered in another thread. I searched long and hard and found the threads that talk about the command to use to get the cpu information. My question is this though. How can you tell if a processor is dual core or if it is just hyper-threading? I am collecting data on all of our Linux boxes and have come across this issue. Will a single processor show two different physical id's if it is dual core?

Thanks in advance for any help.
LQ rocks!!
 
Old 07-20-2008, 01:19 PM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
#su
#lshw

will give you the details. You must use a smp kernel for dual core processors.

You will see 2 processors for dual core.
 
Old 07-20-2008, 01:33 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
You could run:

Code:
cat /proc/cpuinfo
Here's a run on my quad core Q9300 just for reference in case you need it:
Code:
bash-3.1$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
stepping	: 7
cpu MHz		: 2499.715
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 5001.98
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
stepping	: 7
cpu MHz		: 2499.715
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 4999.25
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
stepping	: 7
cpu MHz		: 2499.715
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 1
cpu cores	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 4999.24
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz
stepping	: 7
cpu MHz		: 2499.715
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips	: 5399.18
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
 
Old 07-20-2008, 03:44 PM   #4
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
I find it kinda odd that your quad core also supports hyperthreading, seems rather redundant.
 
Old 07-20-2008, 03:52 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
H TEXMEX H that does not tell you because here is a single hyperthreading 3.0 of mine with your command


processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 5
cpu MHz : 2400.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 cid cx16 xtpr lahf_lm
bogomips : 6029.72

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 5
cpu MHz : 2400.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl est tm2 cid cx16 xtpr lahf_lm
bogomips : 6024.51

I just noticed though if you look at the model number it will tell you.

Last edited by Larry Webb; 07-20-2008 at 03:56 PM.
 
Old 07-20-2008, 04:24 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
AFAIK the ht flag only tells the processor can report how many siblings it has. With matching siblings and cores, you have dual/quad core. With a difference there, you have hyperthreading.
 
Old 07-21-2008, 08:37 AM   #7
kkoene
Member
 
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by makuyl View Post
AFAIK the ht flag only tells the processor can report how many siblings it has. With matching siblings and cores, you have dual/quad core. With a difference there, you have hyperthreading.
Just so I have this straight, if the number for siblings is different it is hyperthreading, if it is the same then it is dual/quad?

Thanks everyone for the suggestions, I am already using cat /proc/cpuinfo. What I don't get is how to tell if the processors are hyperthreading or if they are dual/quad core. On some of our boxes I get a field for cpu_cores on other boxes that field is not there. I have heard that if ht is listed in "flags" then the cpu is hyperthreading, but I have also heard that flags is just a listing of possible flags to use, it doesnt imply that those flags are activated.
 
Old 07-21-2008, 09:15 AM   #8
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Yes, a dual/quad core reports as many cpu cores as siblings. Larry Webb's output shows hyperthreading with 2 siblings but just one core on the same core id. Dual will have different core id's as well. Two separate processors would have different physical id's.
 
Old 07-21-2008, 09:31 AM   #9
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Note also that Larry Webb's output shows both processing units have the same core id.

I've seen several examples of /proc/cpuinfo where it doesn't give you a "cpu cores" line at all, so you can't compare "siblings" to "cpu cores". (Maybe obsolete Linux software. I'm not sure. They weren't my computers).

But each physical package has a unique "physical id" and each core within one physical package has a unique "core id". They might not be densely numbered, so if you see "core id : 3" there may be fewer than four cores. But true cores will have unique ids. So if you see two "processors" that match in both physical id and core id, you know they are divided only by hyperthreading.

Of course if cpuinfo tells you both "siblings" and "cores", comparing those will also tell you and with less effort than comparing all the ids to see which are unique.
 
Old 07-21-2008, 02:29 PM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
If you are using Suse forget the lshw command. Suse apparently did not find a need for it.
 
Old 07-22-2008, 08:45 AM   #11
kkoene
Member
 
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Original Poster
Rep: Reputation: 0
Thank you, thank you, thank you!!

These answers really explain it!

THanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug: threaded app slow on dual core otoomet Programming 2 08-11-2007 03:15 PM
Dual Core CPU Upgrade msound Linux - Hardware 1 12-05-2006 03:56 PM
CPU load on dual core systems MensaWater Linux - General 9 07-11-2006 03:12 PM
working with dual-core CPU Yakyak Linux - Hardware 7 03-13-2006 05:20 AM
redhat9.0 can support p4 hyper threading cpu? laoje Red Hat 4 11-15-2004 06:44 PM


All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration