linux查看CPU数

1.每个cpu是几核(假设cpu配置相同)

more /proc/cpuinfo |grep "physical id"|grep "0"|wc

2.1查看物理CPU的个数

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

3.查看逻辑CPU的个数
#cat /proc/cpuinfo |grep "processor"|wc -l

 

posted @ 2021-07-02 10:42  测试一枚  阅读(101)  评论(0编辑  收藏  举报