`

查看cpu信息

阅读更多

 

linux系统中想要查看cpu信息由两种方式:1.通过lscpu查看系统中cpu的整体信息;2. cat /proc/cpuinfo查看系统中每个逻辑cpu的信息

 

lscpu命令

从下面命令结果中可以看出,这个服务器的配置是,一个物理cpu,双核,4线程(一个线程相当于一个逻辑cpu)

 

[root@instance-w6b0iilx proc]# lscpu
Architecture:          x86_64         //cpu架构是x86的64位
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4             //4个逻辑cpu
On-line CPU(s) list:   0-3
Thread(s) per core:    2             //每个核有两个线程,说明使用了超线程技术
Core(s) per socket:    2             //每个物理卡槽(或者说每个物理CPU)有两个核
Socket(s):             1             //1个物理卡槽
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
Stepping:              4
CPU MHz:               2394.374
BogoMIPS:              4788.74
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              1024K
L3 cache:              28160K
NUMA node0 CPU(s):     0-3

 

 

cat /proc/cpuinfo

该命令查询的结果是每个逻辑cpu对应一块记录:

processor:逻辑cpu(或者说线程)的唯一标识符

physical id:物理cpu的唯一标识符

core id: 内核唯一标识符

siblings:该逻辑cpu所属物理cpu下的逻辑cpu数量

cpu cores: 该逻辑cpu所属物理cpu下的内核数量

 

 

[root@instance-w6b0iilx proc]# cat /proc/cpuinfo 
processor       : 0                                           
vendor_id       : GenuineIntel
cpu family      : 6
model           : 85
model name      : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping        : 4
microcode       : 0x1
cpu MHz         : 2394.374
cache size      : 28160 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : 省略。。
bogomips        : 4788.74
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 85
model name      : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping        : 4
microcode       : 0x1
cpu MHz         : 2394.374
cache size      : 28160 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : 省略。。
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 85
model name      : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping        : 4
microcode       : 0x1
cpu MHz         : 2394.374
cache size      : 28160 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : 省略。。
bogomips        : 4788.74
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 85
model name      : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping        : 4
microcode       : 0x1
cpu MHz         : 2394.374
cache size      : 28160 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : 省略。。
bogomips        : 4788.74
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics