1、几个cpu
# more /proc/cpuinfo |grep "physical id"|uniq|wc -l
2、每个cpu是几核(假设cpu配置相同)
# more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l
# cat /proc/cpuinfo | grep processor
3、查看物理CPU的个数
# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
4、查看逻辑CPU的个数
# cat /proc/cpuinfo |grep "processor"|wc -l
5、查看CPU是几核
# cat /proc/cpuinfo |grep "cores"|uniq
6、查看CPU的主频
# cat /proc/cpuinfo |grep MHz|uniq
时间: 2024-11-01 21:16:29