I suspect that this can be taken from /proc/cpuinfo , perhaps from:

 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm constant_tsc rep_good pni ssse3 lahf_lm 

or from another place (?), offhand nothing more from / proc / cpuinfo is appropriate.

At first glance, the flag ht says about Hyper-threading. But, this is I5-2500, and in its description it is said that 4 core without Hyper-Threading. Therefore, ht is most likely Hyper-Transport. It says here that Hyper-Threading is HTT / HT (apparently sometimes tagged differently?).

AMD analog is also interesting (I don’t know the name).

Nobody knows what and where exactly to look in Linux?

    2 answers 2

    To install Hyper-Threading support, you need to check the CPUID (genuine Intel CPU) and the value of bit No. 28 of the EDX register (set to 1). Click the link to download the CPUCount utility, which somehow works with Hyper-Threading.

    • Thank you, but for me I would like to have a way for the "library" function (read once when you first call / proc / cpuinfo or call something like sysinfo ()). - avp
    • @cool, Thanks again (great, accepted the answer). I found the link from your information: softpixel.com/~cwright/programming/simd/cpuid.php I wrote a program on it, but it turns out that I have an HTT (?). We must separately understand. Maybe I'm testing the wrong bit (?), Bit 28 is written, I make the mask 1 << 28, I get that in 1 (in the / proc / cpuinfo flags it looks like it is named ht ). I don’t close the question yet, can anyone tell me what else. - avp
    1. The ht flag really indicates that the processor has HyperThreading capability.
    2. there is a cpu cores field - it speaks about the number of real cores, there is a siblings field - it says about the number of virtual cores. By their ratio, you can find out about the presence of HyperThreading and the number of threads per physical core.
    • @mikillskegg, thank you. - cpu cores: 4 siblings: 4 In the Intel® Core ™ i5-2500 Processor specification (6M Cache, 3.30 GHz) \ # of Cores 4 \ # of Threads 4 Thus. In order to find out the number of simultaneously running threads, you need to watch siblings? Actually, I'm not only interested in this computer, but what to see when running on any x-86? - avp
    • it turns out, so. but this only says HT is enabled. I experimented on my computer (Core i7). In normal mode, siblings 8 cpu cores 4, with siblings 4 cpu cores 4 disabled in the HT BIOS. - skegg
    • It seems so. Tomorrow I'll look at work on the Dual-Core ... And do you have the flags ht in both cases? - avp
    • to ug, on both - skegg
    • one
      AMD Athlon (tm) 64 X2 siblings 2 cpu cores 2 ht exposed. - skegg