Total Pageviews

Monday, 21 December 2015

查看cpu信息

#cat /proc/cpuinfo |grep "model name"
逻辑CPU个数:
# cat /proc/cpuinfo | grep "processor" | wc -l
物理CPU个数:
# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
每个物理CPU中Core的个数:
# cat /proc/cpuinfo | grep "cpu cores" | wc -l
每个物理CPU中逻辑CPU(可能是core, threads或both)的个数:
#cat /proc/cpuinfo | grep "siblings"|wc -l
[root@bj-76-51 ~]# cat /proc/cpuinfo |grep "model name"
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
[root@bj-76-51 ~]# cat /proc/cpuinfo | grep "processor" | wc -l
16
[root@bj-76-51 ~]# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2
[root@bj-76-51 ~]# cat /proc/cpuinfo | grep "cpu cores" | wc -l
16
[root@bj-76-51 ~]# cat /proc/cpuinfo | grep "siblings"
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
siblings : 8
可以看出,此服务器
cpu类型 Intel Xeon E5620 (2.40GHz 四核)
cpu个数 2
http://ark.intel.com/products/47925