物理cpu:主板插槽上的的cpu個數(shù)
邏輯cpu:一顆cpu可以有多個核心,加上intel超線程技術(shù),可以在
加上intel的超線程技術(shù)(HT), 可以在邏輯上再分一倍數(shù)量的cpu core出來
邏輯CPU數(shù)量=物理cpu數(shù)量 * cpu cores 這個規(guī)格值 * 2(如果支持并開啟ht)
注:linux top看到的是邏輯cpu的數(shù)量
==============================
1. ?查看物理cpu個數(shù)(主板插的cpu個數(shù))
cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l

cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l
2. 查看邏輯cpu個數(shù)(top命令顯示的cpu個數(shù))
cat /proc/cpuinfo | grep 'processor' | wc -l

cat /proc/cpuinfo | grep 'processor' | wc -l
3.查看cpu是幾核
cat /proc/cpuinfo | grep 'cores' | uniq

cat /proc/cpuinfo | grep 'cores' | uniq