View each CPU usage

Source: Internet
Author: User

1. in Linux, how does one view the CPU usage:

# Top-D 1

Then press the number 1 to display multiple CPUs (the same is true for top CPU and 1 CPU)

Cpu0: 1.0% us, 3.0% Sy, 0.0% Ni, 96.0% ID, 0.0% wa, 0.0% hi, 0.0% Si, 0.0% St
Cpu1: 0.0% us, 0.0% Sy, 0.0% Ni, 100.0% ID, 0.0% wa, 0.0% hi, 0.0% Si, 0.0% St

2. in Linux, how can I check whether it is multi-core or multi-CPU:

# Cat/proc/cpuinfo

If there are multiple projects similar to the following, it is multi-core or multi-CPU:

Processor: 0

......

Processor: 1

3. How to check the CPU on which a process runs:

# Top-D 1

Then press F. To go to the top current fields settings page:

Selected: J: P = last used CPU (SMP)

If this parameter is left blank, P indicates the CPU used by the process.

Sam has been tested and found that different CPU cores are used for the same process at different times. This should be handled by Linux kernel SMP.

4. Configure Linux kernel to support multiple cores:

The config_smp option must be enabled during Kernel configuration to make the kernel aware of SMP.

Processor type and features ---> hierarchical Ric multi-processing support

Check whether or not Linux kernel supports (or uses) SMP

# Uname-

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.