Monitor the overall CPU performance in Linux

Source: Internet
Author: User

Cat/proc/stat

The specific meaning of each field:
User: indicates the CPU time in the User State from the time the system starts to the current time. The unit is 0.01 s.
Nice: the CPU time occupied by processes with a negative nice value from the system startup to the current time, in 0.01 s
System: starts from the start of the System to the current time. Core time: 0.01 s
Idle: The wait time (in 0.01 s) except hard disk IO wait time from the time the system starts to accumulate to the current time.
Iowait: Hard Disk I/O wait time from system startup to current time, in 0.01 s
Irq: The Hard interruption time from the system start to the current time. Unit: 0.01 s
Softirq: the time from the system startup to the current time. The Soft Interrupt time, in the unit of 0.01 s.
CPU total time = user + system + nice + idle + iowait + irq + softirq
Intr indicates the number of all interruptions that have occurred since the system was started, and then the number of interruptions that have occurred since the system was started.
The number of times the CPU context has been exchanged since the Ctxt was started.
Btime: the time until now when the system starts to love you.
Processes (total_forks), the number of tasks created since the system was started.
Procs_running: number of tasks in the current queue
Procs_blocked: Number of blocked tasks.

/Proc/loadavg: cat/proc/loadavg

Lavg_1: one-minute Load
Lavg_5: five-minute Load
Lavg_15: 15-minute Load
Nr_running: number of tasks in the running queue at the sampling time, which is the same as procs_running in/proc/stat.
Nr_threads: Number of active tasks in the system at the sampling time.
Last_pid, the maximum pid value, including lightweight processes, that is, threads.

Analysis of Fault cases caused by SUSE Linux CPU power-saving mode

Number of physical CPU, logical CPU, and CPU cores in Linux

Use the/proc/stat file in Linux to calculate the cpu usage (with source code)

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.