In-depth understanding of the linux System Task Manager top
Source: Internet
Author: User
A deep understanding of linux System Task Manager top-general Linux technology-Linux programming and kernel information. The following is a detailed description. The first line is easy to see.
To put it simply, load average :***
The first number is: Average number of processes competing for CPU in 5 minutes
The second number is: Average number of processes competing for CPU resources within 10 minutes
The third number is: Average number of processes competing for CPU resources within 15 minutes
Row 2:
Tasks :*
If the number of tasks is more than 150, consider whether the system is faulty.
It can be accepted normally between and.
The number of running tasks. This is a 4-core CPU, so it can have more than one Running at the same time.
Sleeping is the same as Running.
Running + Sleeping = Tasks
? Stop.
? The number of zombie botnets. If there are a large number of zombie, you need to consider whether there is a bottle of strength in the system, resulting in abnormal processes. Or what is the problem with the application. You can check
Check the I/O and pay attention to the process where the zombie process is going to analyze the problem. If it is a system process, you 'd better test the lib problem, I have encountered the slackware system process. zombie then re-compiled the corresponding lib and made a CD reinstallation. Then the problem was solved.
Row 3:
CPU:
Us: CPU usage percentage of user programs.
When the CPU usage of a user program is greater than 50% or often greater than 70%, you should re-display it and analyze whether it can be cached or processed by other methods.
Sy: CPU usage percentage of System Processes
If the value is high, it indicates that the kernel may have a pathological problem, and further analysis is required. Analyze the kernel compilation.
Ni: Nice adjusted CPU usage percentage
Id: Percentage of idle CPU time
Wa: Percentage of CPU time consumed by I/O wait
Row 4 and line 5
It is also the result of free output.
Mem: total memory, used, idle, and buffer.
Swap: Number of Swap, number of used, number of idle, and number of cached operations
If Swap is used a lot but the CPU is idle, you can disable the swap so that the CPU can also do the work. Do not let all the work be done to let the memory dry.
Row 6:
PID process ID
Owner of the USER process
Superior PR Process
NI Nice level
VIRT Virtual Image unit: Kb
Memory occupied by virtual mirrors in memory
RES Resident size (kb)
Memory Used in physical memory
SHR Shared Mem size unit: Kb
Process shared memory size
S = State of the process: S = sleeping, R = running, T = stopped or traced,
D = interruptible sleep, Z = zombie. The process state is discussed further in
1.1.7, "Process state ".
Pay more attention to this. There are many BT interviews to ask this question.
% CPU usage percentage
% MEM usage percentage
TIME + CPU usage TIME
Programs run by COMMAND
Some useful examples in Top:
T shut down or enable the CPU.
M. Disable or enable MEM.
A displays the Top format in different ways. It is easy to find the process that occupies resources. I also like this
F. If you are not satisfied with the display of Top, press f to enter the configuration, which is as good as any Windows Manager.
O is configured with f, remember to press o Application
R resets the nice level of the process. It is equal to renice.
Kill the corresponding process. kill equals to Kill
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