生产环境使用的肯定是linux系统的服务器,那么在centos上如何知道系统cpu等相关配置情况,来掌握服务器性可以呢?如下是几点查看cpu信息的方法。
Logical CPU Number : 64
Physical CPU Number : 4
CPU Core Number : 8
HT Number : 2
#cat /proc/cpuinfo |grep "processor"|sort -u|wc -l
#grep "physical id" /proc/cpuinfo|sort -u|wc -l
#grep "physical id" /proc/cpuinfo|sort -u
physical id : 0
physical id : 1
#grep "cpu cores" /proc/cpuinfo|uniq
cpu cores : 6
#grep "siblings" /proc/cpuinfo|uniq
siblings : 12
假如多个逻辑CPU的"physical id"和"core id"均相同,说明开启了超线程
逻辑CPU个数 > 物理CPU个数 *cpu核数 开启了超线程