linux cpuinfo

1、物理cpu颗数 

    cat /proc/cpuinfo|grep "physical id" |sort -u |wc -l

2、cpu核数

cat /proc/cpuinfo |grep "cpu cores" |sort -u |awk '{print $4}'

 

3、单颗cpu 逻辑cpu 个数

cat  /proc/cpuinfo |grep siblings |uniq

你可能感兴趣的:(linux cpuinfo)