linux 下查看机器是cpu是几核的
时间:2011-02-28 来源:茄子_2008
more /proc/cpuinfo |grep "physical id"|uniq|wc -l
每个cpu是几核(假设cpu配置相同)
more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l
cat /proc/cpuinfo | grep processor
1. 查看物理CPU的个数
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
2. 查看逻辑CPU的个数
#cat /proc/cpuinfo |grep "processor"|wc -l
3. 查看CPU是几核
#cat /proc/cpuinfo |grep "cores"|uniq
4. 查看CPU的主频
#cat /proc/cpuinfo |grep MHz|uniq
相关阅读 更多 +