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)