举个例子:Inter Core i7 3930k
得出的结论:1个物理cpu,六核,12线程
(1)查看物理cpu个数
# cat /proc/cpuinfo | grep 'physical id' | uniq
1
(2)查看cpu的核数
# cat /proc/cpuinfo | grep "cpu cores" | uniq
6
(3)查看cpu的总线程数
# cat /proc/cpuinfo | grep "siblings" | uniq
12
转载于:https://blog.51cto.com/zhangmingqian/1249331