linux命令之lscpu
1.lscpu介绍
linux命令lscpu是用来查看服务器上cpu相关信息
2.lscpu用法
lscpu [参数]
lscpu参数
参数 |
说明 |
-a |
显示online和offline CPU信息 |
-b |
显示online CPU信息 |
-c |
显示offline CPU信息 |
-e |
以可读的方式显示CPU信息 |
3.实例
3.1.显示online和offline CPU信息
命令:
lscpu
[root@rhel77 ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 165
Model name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Stepping: 2
CPU MHz: 2591.997
BogoMIPS: 5183.99
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
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 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec arat pku ospke md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities
[root@rhel77 ~]#
3.2.显示online CPU信息
命令:
lscpu -bp
[root@rhel77 ~]# lscpu -bp
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
0,0,0,0,,0,0,0,0
1,1,0,0,,1,1,1,0
2,2,1,0,,2,2,2,1
3,3,1,0,,3,3,3,1
3.3.显示offline CPU信息
命令:
lscpu -ce
[root@rhel77 ~]# lscpu -ce
[root@rhel77 ~]#