歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> linux中多個cpu查看方法

linux中多個cpu查看方法

日期:2017/3/2 16:33:45   编辑:Linux服務器

 現在機器的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"

Copyright © Linux教程網 All Rights Reserved