linux下查看cpu的情况
现在机器的cpu越来越复杂,一个cpu,经常是几个内核,4,6,8都不是什么稀罕的事情. 当年我公司购买一台8cpu的AMD服务器,双核,当时看到cpu很壮观,16个cpu. 现在一台普通的2U的服务器,都可能看到这种场景. http://planet.admon.org/howto/about-cpu-the-logical-and-physical-cores/ There are some commands here to help identify these type of information quickly on a running Linux: Total amount of processors including the logical ones: # cat /proc/cpuinfo | grep "processor"| wc -l Total amount of CPU package: # cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l How many cores for each CPU. (Here we should call CPU as physical package as we mentioned above): # cat /proc/cpuinfo | grep "cpu cores" | wc -l For each physical CPU, the amount of Logical CPU (the logical CPU can be physical cores, soft cores like threaded, or both). # cat /proc/cpuinfo | grep "siblings" |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |