概念
總核數(shù) = 物理CPU個數(shù) X 每顆物理CPU的核數(shù)
總邏輯CPU數(shù) = 物理CPU個數(shù) X 每顆物理CPU的核數(shù) X 超線程數(shù)
查看物理CPU個數(shù)
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
查看每個物理CPU中core的個數(shù)(即核數(shù))
cat /proc/cpuinfo| grep "cpu cores"| uniq
查看邏輯CPU的個數(shù)
cat /proc/cpuinfo| grep "processor"| wc -l