Recently in the search for some difficult diseases, the LIUNX related system commands are not very familiar with, or in a netizen to help, found that some of the top command I will not use,
So the top command to review. Use the screenshot below:
Parts of the situation:
3 Users,
Load average: Average length of task, three values 1, 5, 15 minutes ago to current average
tasks: There are 156 processes in total, 1 processes running, 154 processes in hibernation, 0 stop processes, 1 zombie processes
Display separately:
%sy kernel space consumes CPU percent,
%ni processes that have changed priority in the user process space consume CPU percentages,
%id Idle CPU percent,
%wa the percentage of CPU time waiting for input output (I/O),
%hi refers to the CPU processing hardware interrupt time,%SI refers to the CPU processing soft interrupt time,
%st is used with virtual CPUs to indicate the CPU time stolen by the virtual machine.
Above is the overview of top display.
Here is the top command line arguments,
-m parameter display effect:
-H parameter display effect (is to show thread execution of the current process)
Its contents are as follows:
12:38:33 |
Current time |
Up 50days |
System run time, format last: Min |
1 user |
Number of users currently logged in |
Load average:0.06, 0.60, 0.48 |
System load, which is the average length of the task queue. Three values are 1 minutes, 5 minutes, and 15 minutes ago to the current average. |
2. The second to third act process and CPU information
When you have more than one CPU, the content can be more than two lines. The contents are as follows:
tasks:29 Total |
Total Processes |
1 Running |
Number of processes that are running |
Sleeping |
Number of processes to sleep |
0 stopped |
Number of processes stopped |
0 Zombie |
Number of zombie processes |
Cpu (s): 0.3% US |
Percentage of CPU consumed by user space |
1.0% Sy |
Kernel Footprint CPU percent |
0.0% ni |
Percentage of CPU in user process space that has changed priority |
98.7% ID |
Idle CPU percent |
0.0% WA |
Percentage of CPU time waiting for input output |
0.0% hi |
0.0% si |
3. The 45th Act memory information.
The contents are as follows:
MEM:191272K Total |
Total Physical Memory |
173656k used |
Total amount of physical memory used |
17616k Free |
Total Free Memory |
22052k buffers |
Amount of memory used as kernel cache |
SWAP:192772K Total |
Total Exchange Area |
0k used |
Total number of swap areas used |
192772k Free |
Total Free Swap Area |
123988k Cached |
The total number of buffered swap areas. The content in memory is swapped out to the swap area and then swapped into memory, but the used swap area has not been overwritten, which is the size of the swap area where the content already exists in memory . When the corresponding memory is swapped out again, you do not have to write to the swap area again. |
Two. Process information
Column Name |
Meaning |
Pid |
Process ID |
PPID |
Parent Process ID |
Ruser |
Real user Name |
Uid |
User ID of the process owner |
USER |
User name of the process owner |
GROUP |
Group name of the process owner |
Tty |
The terminal name of the startup process. Processes that are not started from the terminal are displayed as? |
PR |
Priority level |
NI |
Nice value. A negative value indicates a high priority, and a positive value indicates a low priority |
P |
The last CPU used is meaningful only in a multiple CPU environment |
%cpu |
Percentage of CPU time that was last updated to now |
Time |
Total CPU time used by the process, in seconds |
time+ |
Total CPU time used by the process, in units 1/100 seconds |
%mem |
Percentage of physical memory used by the process |
Virt |
Total amount of virtual memory used by the process, in kilobytes per KB. Virt=swap+res |
SWAP |
The amount of virtual memory that the process uses, swapped out in kilobytes. |
Res |
The amount of physical memory that the process uses, not swapped out, in kilobytes. Res=code+data |
CODE |
The amount of physical memory that the executable code occupies, in kilobytes |
DATA |
The amount of physical memory occupied by parts other than executable code (data segment + stack), in kilobytes |
Shr |
Shared memory size, per kb |
Nflt |
Number of page faults |
Ndrt |
The number of pages that were modified the last time it was written to. |
S |
Process status. D= an uninterrupted sleep state R= Run S= Sleep t= Tracking/Stopping z= Zombie Process |
COMMAND |
Command name/command line |
Wchan |
If the process is sleeping, the name of the system function in sleep is displayed |
Flags |
Task flags, reference sched.h |