lscpu命令可以查看cpu相关信息,也是比较常见的命令。
- 语法
[hamming@VM_0_15_centos ~]$ lscpu [选项]
- 选项(我一般不用)
-a, --all # 打印在线和离线CPU(和 -p 或 -e 配合使用)
-b, --online # 仅打印在线CPU(和 -p 或 -e 配合使用)
-c, --offline # 打印离线CPU(和 -p 或 -e 配合使用)
-e, --extended[=] # 打印出一个扩展的可读格式(方便人阅读)
-p, --parse[=] # 打印出可解析的格式,方便程序解析
- 示例
[hamming@VM_0_15_centos tmp]$ lscpu
Architecture: x86_64 # cpu 架构(重点)
CPU op-mode(s): 32-bit, 64-bit # cpu 支持的模式(重点)
Byte Order: Little Endian # cpu 处理模式,可以参考大小端篇文章(重点)
CPU(s): 1 # cpu 核数(重点)
On-line CPU(s) list: 0 # cpu 在线数量,过热或异常可能离线
Thread(s) per core: 1 # 每个核心线程数(重点)
Core(s) per socket: 1 # 每个物理 cpu 核数
Socket(s): 1 # 物理 cpu 数量
NUMA node(s): 1 # NUMA 节点数
Vendor ID: GenuineIntel # cpu 厂商 ID
CPU family: 6 # 厂商设定的CPU家族编号
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-26xx v4
Stepping: 1
CPU MHz: 2399.988
BogoMIPS: 4799.97
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K # 一级高速缓存 dcache 用来存储数据
L1i cache: 32K # 一级高速缓存 icache 用来存储指令
L2 cache: 4096K # 二级缓存
NUMA node0 CPU(s): 0
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 lm constant_tsc rep_good nopl 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 bmi1 avx2
bmi2 rdseed adx xsaveopt
- 参考资料
来源于网络
- 关注公众号一起学习——无涯的计算机笔
本文使用 文章同步助手 同步