要检测您是否正在使用超线程(又名英特尔超线程技术),可以使用dmidecode。
在终端中:
sudo dmidecode > /tmp/dmidecode.txt
gksudo gedit /tmp/dmidecode.txt
查找“已填充,已启用”的状态值(如下所示,显示在* ... *之间),即“已启用”表示超线程处于活动状态
Physical CPU
Handle 0x000C, DMI type 4, 32 bytes
Processor Information
Socket Designation: Socket 1 CPU 1
Type: Central Processor
Family: Xeon
Manufacturer: GenuineIntel
ID: 43 0F 00 00 01 03 00 00
Signature: Type 0, Family 15, Model 4, Stepping 3
Flags:
FPU (Floating-point unit on-chip)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
Version: Intel Xeon
Voltage: 1.5 V
External Clock: 200 MHz
Max Speed: 4000 MHz
Current Speed: 3800 MHz
Status: *Populated, Enabled*
Upgrade: ZIF Socket
L1 Cache Handle: 0x0004
L2 Cache Handle: 0x0005
L3 Cache Handle: Not Provided
在超线程逻辑CPU中,您将看到状态值未填充(显示在下面的* ... *之间):
Handle 0x000D, DMI type 4, 32 bytes
Processor Information
Socket Designation: Socket 2 CPU 2
Type: Unknown
Family: Unknown
Manufacturer: Not Specified
ID: 00 00 00 00 00 00 00 00
Version: Not Specified
Voltage: 1.5 V
External Clock: 200 MHz
Max Speed: 4000 MHz
Current Speed: 3800 MHz
Status: *Unpopulated*
Upgrade: ZIF Socket
L1 Cache Handle: 0x0006
L2 Cache Handle: 0x0007
L3 Cache Handle: Not Provided
资源