Home > Linux, 工具介绍 > lscpu – CPU architecture information查看器

lscpu – CPU architecture information查看器

December 5th, 2011

原创文章,转载请注明: 转载自系统技术非业余研究

本文链接地址: lscpu – CPU architecture information查看器

很多时候我们要了解CPU的型号,NUMA架构, L1,L2,L3 Cache大小等信息, 为服务器程序的编写和设置做决策。
Linux下除了 /proc/cpuinfo提供的信息以外,还有intel自己的工具: 参间 CPU拓扑结构的调查: http://blog.yufeng.info/archives/666

但是这些都不是很方便, 同样来自util-linux-ng包的lscpu很清晰的告诉你上面的信息. RHEL 6.1 已经预先安装好了。

man lscpu

DESCRIPTION
lscpu gathers CPU architecture information like number of CPUs, threads, cores, sockets, NUMA nodes, information about CPU caches, CPU family,
model, bogoMIPS, byte order and stepping from sysfs and /proc/cpuinfo, and prints it in human-readable format. It supports both online and
offline CPUs. Alternatively, it can print out in parsable format including how different caches are shared by different CPUs, which can also be
fed to other programs.

我们来演示下:

$ uname -r
2.6.32-131.0.15.el6.x86_64
$ 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:    4
CPU socket(s):         2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 44
Stepping:              2
CPU MHz:               2394.164
BogoMIPS:              4787.83
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0,2,4,6,8,10,12,14
NUMA node1 CPU(s):     1,3,5,7,9,11,13,15

numa什么的在那里分布很清晰,赞下!

祝玩得开心!

Post Footer automatically generated by wp-posturl plugin for wordpress.

Categories: Linux, 工具介绍 Tags: ,
Comments are closed.