cat /proc/cpuinfo | grep "processor" |wc -l
查看CPU线程
#cat /proc/cpuinfo | grep name | cut -f2 -d: |uniq -c 8 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
数字8也是为CPU线程
# cat /proc/cpuinfo | grep "physical id" | uniq physical id : 1
查看物理CPU 个数为1
cat /proc/cpuinfo | grep "core id" | sort | uniq core id : 0 core id : 1 core id : 10 core id : 9
cat /proc/cpuinfo | grep "cores" |uniq cpu cores : 4
查看CPU核数 以上显示为4核
具有相同core id的CPU是同一个core的超线程
本文出自 “木木” 博客,请务必保留此出处http://cobweb.blog.51cto.com/390607/1397739