1、逻辑cpu个数(线程数)
[root@centos79 test]# cat /proc/cpuinfo | grep "processor" processor : 0 processor : 1 processor : 2 processor : 3 [root@centos79 test]# cat /proc/cpuinfo | grep "processor" | wc -l 4
2、物理cpu个数
[root@centos79 test]# cat /proc/cpuinfo | grep "physical id" physical id : 0 physical id : 0 physical id : 1 physical id : 1 [root@centos79 test]# cat /proc/cpuinfo | grep "physical id" | sort | uniq -c 2 physical id : 0 2 physical id : 1 [root@centos79 test]# cat /proc/cpuinfo | grep "physical id" | sort | uniq -c | wc -l 2
3、查看每个cpu核心数
[root@centos79 test]# cat /proc/cpuinfo | grep "cpu cores" cpu cores : 2 cpu cores : 2 cpu cores : 2 cpu cores : 2 [root@centos79 test]# cat /proc/cpuinfo | grep "cpu cores" | uniq | awk -F: '{print $2}' 2
4、查看cpu型号
[root@centos79 test]# dmidecode -s processor-version | uniq AMD Ryzen 5 3600X 6-Core Processor
5、汇总
[root@centos79 test]# lscpu Architecture: x86_64 cpu op-mode(s): 32-bit, 64-bit Byte Order: Little Endian cpu(s): 4 ## 逻辑cpu个数 On-line cpu(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 2 ## 每个cpu核心数 Socket(s): 2 ## 物理cpu个数 NUMA node(s): 1 vendor ID: AuthenticAMD cpu family: 23 Model: 113 Model name: AMD Ryzen 5 3600X 6-Core Processor ## cpu型号 Stepping: 0 cpu MHz: 3800.009 BogoMIPS: 7600.01 Virtualization: AMD-V Hypervisor vendor: VMware Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 512K L3 cache: 32768K NUMA node0 cpu(s): 0-3 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 art rep_good nopl tsc_reliable nonstop_tsc extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dNowprefetch osvw perfctr_core retpoline_amd ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec clzero arat npt svm_lock nrip_save vmcb_clean flushbyasid decodeassists overflow_recov succor
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。