查看cpu核数
查看有几个物理CPU
cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
查看cpu核数(物理核)
cat /proc/cpuinfo | grep "core id" | sort | uniq | wc -l
查看CPU线程
cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l
查看CPU总核数(逻辑核)
grep 'model name' /proc/cpuinfo | wc -l