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 processor | wc -l
cat /proc/cpuinfo |grep siblings |uniq (每颗cpu)
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 processor | wc -l
cat /proc/cpuinfo |grep siblings |uniq (每颗cpu)
转载于:https://my.oschina.net/u/1758546/blog/398705