View cpu usage in linux

Source: Internet
Author: User
Article Title: View cpu usage in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

At present, the cpu of machines is getting more and more complex. A single cpu is often a few kernels, such as 4, 6, and 8.

When my company purchased an 8-cpu AMD server with dual-core, we saw a spectacular cpu with 16 CPUs.

This scenario can be seen on a common 2U server.

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 shocould 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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.