LinuxCPU查询、超线程查询
LinuxCPU查询、超线程查询
查看物理CPU数量:
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
查看逻辑的:
cat /proc/cpuinfo| grep processor|sort|uniq|wc -l
查看正常情况下的CPU逻辑数量:1颗物理CPU逻辑上是12core
grep "siblings" /proc/cpuinfo|uniq
grep "cpu cores" /proc/cpuinfo|uniq
查看是否具有相同core_id 有相同的则说明开启了超线程
grep 'core id' /proc/cpuinfo