Linux 查看服务器硬件信息
目录
CPU
总核数 = 物理CPU个数 X 每颗物理CPU的核数
总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数
- 查看路数/Socket(s)
cat /proc/cpuinfo | grep -i "physical id" | sort | uniq | wc -l
- 查看每路核心数
cat /proc/cpuinfo | grep -i "cores" | uniq
- 查看是否开启超线程
cat /proc/cpuinfo | grep -i "siblings" | uniq
如果cpu cores数量和siblings数量一致,则没有启用超线程,否则超线程被启用
WARNING: No any other purpose,keeping reminded! So sorry to offended,if necessary, contact me and I do change what I had done to protect your privileges!