赞
踩
总核数 = 物理CPU个数 X 每颗物理CPU的核数
总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数
cat /proc/cpuinfo | grep 'model name' |uniq
# model name : Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
grep "model name" /proc/cpuinfo |awk -F ':' '{print $NF}'
# 输出如下
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
cat /proc/cpuinfo| grep "cpu cores"| uniq
cat /proc/cpuinfo| grep "processor"| wc -l
grep 'processor' /proc/cpuinfo | sort -u | wc -l
注意,此处查看的线程数是总的线程数,可以理解为逻辑cpu的数量
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。