1. 程式人生 > 其它 >linux伺服器檢視CPU個數

linux伺服器檢視CPU個數

cat /proc/cpuinfo

* processor 條目包括這一邏輯處理器的唯一識別符號。
* physical id 條目包括每個物理封裝的唯一識別符號。
* core id 條目儲存每個核心的唯一識別符號。
* siblings 條目列出了位於相同物理封裝中的邏輯處理器的數量。
* cpu cores 條目包含位於相同物理封裝中的核心數量。

一個物理CPU上有多個核,每個核上有多個邏輯CPU

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 106
model name : Intel(R) Xeon(R) Platinum 8368 CPU @ 2.40GHz
stepping : 6
microcode : 0xd0002e0
cpu MHz : 3200.000
cache size : 58368 KB
physical id : 0 過濾物理ID可以得到物理CPU的個數


siblings : 76 該物理CPU上有多少個邏輯CPU, 通常每個核上有2個邏輯CPU, 所以這裡的值為76
core id : 0
cpu cores : 38每個物理CPU上有多少個核
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 27
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 pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid md_clear pconfig flush_l1d arch_capabilities
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs
bogomips : 4800.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 57 bits virtual
power management: