查看cpu情況
拿到一臺(tái)服務(wù)器所森,相信大部分站長都會(huì)第一時(shí)間查看服務(wù)器硬件信息是否和賣家所說相符玉转,今天小編教你如何查看centos7的cpu信息荚板。
centos7查看CPU型號(hào)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
centos7查看物理CPU個(gè)數(shù)
cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l
centos7查看邏輯CPU個(gè)數(shù)
cat /proc/cpuinfo | grep "processor" | wc -l
centos7查看CPU內(nèi)核數(shù)
cat /proc/cpuinfo | grep "cpu cores" | uniq
centos7查看單個(gè)物理CPU封裝的邏輯CPU數(shù)量
cat /proc/cpuinfo | grep "siblings" | uniq
centos7查看是否超線程
cat /proc/cpuinfo | grep -e "cpu cores" -e "siblings" | sort | uniq
計(jì)算是否開啟超線程
邏輯CPU > 物理CPU x CPU核數(shù) (開啟超線程)
邏輯CPU = 物理CPU x CPU核數(shù) (沒有開啟超線程或不支持超線程)
如果cpu cores數(shù)量和siblings數(shù)量一致址遇,則沒有啟用超線程戴涝,否則超線程被啟用滋戳。