查看物理cpu个数
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l
查看逻辑CPU的个数
cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l
总核数 =物理CPU个数 X 每颗物理CPU的核数
网友评论