标签:
一、概念
① 物理CPU
② 逻辑CPU
③ CPU核数
二、查看CPU信息
① 查看物理CPU的个数
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
② 查看逻辑CPU的个数(也是线程数)
#cat /proc/cpuinfo |grep "processor"|wc -l
③ 查看CPU是几核
#cat /proc/cpuinfo |grep "cores"|uniq
④ 查看CPU信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
注:
#逻辑CPU数量=物理cpu数量 x cpu cores
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数
# 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数(2)
[foura@fs-qr-gw-push-biz-1 ~]$ cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l 2 [foura@fs-qr-gw-push-biz-1 ~]$ cat /proc/cpuinfo |grep "cores"|uniq cpu cores : 8 [foura@fs-qr-gw-push-biz-1 ~]$ cat /proc/cpuinfo |grep "processor"|wc -l 32 [foura@fs-qr-gw-push-biz-1 ~]$
标签:
原文地址:http://www.cnblogs.com/yangg518/p/5600408.html