如何在Red Hat Linux(RHEL)上查看CPU信息
时间:2019-11-20 08:53:28 来源:igfitidea点击:
在RHEL(RedHat Enterprise Linux)中,如何查看CPU的数量和型号,频率等信息?
在RHEL 5.x/6.x/7.x如何查看服务器配置,包括CPU数量等?
在Red Hat Enterprise Linux(RHEL)上查看CPU信息
查看cpu信息:
lscpu
输出示例:
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 16 On-line CPU(s) list: 0-15 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 1 NUMA node(s): 1 Vendor ID: AuthenticAMD CPU family: 23 Model: 1 Model name: AMD Ryzen 7 1700 Eight-Core Processor Stepping: 1 CPU MHz: 1546.617 CPU max MHz: 3000.0000 CPU min MHz: 1550.0000 BogoMIPS: 5988.15 Virtualization: AMD-V L1d cache: 32K L1i cache: 64K L2 cache: 512K L3 cache: 8192K NUMA node0 CPU(s): 0-15 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 mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
使用/proc/cpuinfo查看CPU信息
cat /proc/cpuinfo
RHEL Linux查看CPU数量
查看Linux服务器有多少个CPU
grep physical.id /proc/cpuinfo | sort -u | wc -l
查看CPU的内核数:
grep cpu.cores /proc/cpuinfo | sort -u
Linux查看逻辑CPU的数量:
grep processor /proc/cpuinfo | wc -l
使用dmidecode命令查看CPU的参数:
sudo dmidecode -t4
如何查看Linux服务器的CPU插槽数?
在RHEL中确定服务器上的CPU插槽数:
grep physical.id /proc/cpuinfo | sort -u | wc -l
或使用lscpu命令:
lscpu | grep -i "socket(s)"