Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.