Judge the basis:
1. CPUs with the same core ID are the same core hyper-threading.
2. CPUs with the same physical ID are the same CPU-encapsulated threads or cores.
English version:
1.Physical ID and core ID are not necessarily consecutive but they unique. Any CPUs with the same core ID are hyperthreads in the same core.
2.Any CPU with the same physical ID are threads or cores in the same socket.
View current operating system kernel information
# uname-a
Linux redcat 2.6.31-20-generic #58-ubuntu SMP Fri Mar 05:23:09 UTC i686 gnu/linux
view current operating system release information
#cat/etc/issue
Ubuntu 9.10 \ \l
View CPU Model
# Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
2 Intel (R) Core (TM) 2 Duo CPU P8600 @ 2.40GHz
(see there are 2 logical CPUs, also know the CPU model)
To view the number of physical CPU stars
# Cat/proc/cpuinfo | grep Physical | Uniq-c 2 Physical id:0
(1 2 cores are actually CPU)
View CPU operating mode
# getconf Long_bit
32
(indicates that the current CPU is running in 32bit mode, but does not mean CPU does not support 64bit)
To see if the CPU supports 64bit
# Cat/proc/cpuinfo | grep Flags | grep ' LM ' | Wc-l
2
(The result is greater than 0, which indicates support for 64bit calculation. LM refers to long mode, support LM is 64bit)
view a summary of the CPU information (just discovered yesterday when you looked at Aix, even on Ubuntu):
#lscpu
architecture:i686 #架构686
CPU (s): 2 #逻辑cpu颗数是2
Thread (s) per core:1 #每个核心线程数是1
Core (s) per socket:2 #每个cpu插槽核数/each physical CPU core is 2
CPU socket (s): 1 #cpu插槽数是1
Vendor Id:genuineintel #cpu厂商ID是GenuineIntel
CPU Family:6 #cpu系列是6
Model:23 #型号23
Stepping:10 #步进是10
CPU mhz:800.000 #cpu主频是800MHz
Virtualization:vt-x #cpu支持的虚拟化技术VT-X (for this next posting explanation http://hi.baidu.com/sdusoul/blog/item/5d8e 0488def3a998a5c272c0.html)
l1d cache:32k #一级缓存32K (Google, which means that the CPU's L1 data cache is 32k)
L1i cache:32k #一级缓存32K (specifically for L1 instruction cache 32K)
L2 cache:3072k #二级缓存3072K
Finally, a all-inclusive:
#cat/proc/cpuinfo
processor:0
Vendor_id:genuineintel
CPU Family:6
Model:23
Model Name:intel (R) Core (TM) 2 Duo CPU P8600 @ 2.40GHz
Stepping:10
CPU mhz:800.000
Cache size:3072 KB
Physical id:0
Siblings:2
Core id:0
CPU Cores:2
apicid:0
Initial apicid:0
Fdiv_bug:no
Hlt_bug:no
F00f_bug:no
Coma_bug:no
Fpu:yes
Fpu_exception:yes
CPUID level:13
Wp:yes
FLAGS:FPU VME de PSE TSC MSR PAE MCE cx8 APIC MTRR PGE MCA cmov Pat PSE36 clflush DTS ACPI MMX FXSR SSE SSE2 SS H T TM PBE nx LM CONSTANT_TSC Arch_perfmon pebs BTS pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 XS Ave LAHF_LM Ida Tpr_shadow Vnmi flexpriority
bogomips:4788.60
Clflush size:64
Power Management:
Processor:1
Vendor_id:genuineintel
CPU Family:6
Model:23
Model Name:intel (R) Core (TM) 2 Duo CPU P8600 @ 2.40GHz
Stepping:10
CPU mhz:800.000
Cache size:3072 KB
Physical id:0
Siblings:2
Core Id:1
CPU Cores:2
Apicid:1
Initial apicid:1
Fdiv_bug:no
Hlt_bug:no
F00f_bug:no
Coma_bug:no
Fpu:yes
Fpu_exception:yes
CPUID level:13
Wp:yes
FLAGS:FPU VME de PSE TSC MSR PAE MCE cx8 APIC MTRR PGE MCA cmov Pat PSE36 clflush DTS ACPI MMX FXSR SSE SSE2 SS H T TM PBE nx LM CONSTANT_TSC Arch_perfmon pebs BTS pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 XS Ave LAHF_LM Ida Tpr_shadow Vnmi flexpriority
bogomips:4787.96
Clflush size:64
Power Management: