Linux Command Tools Top
The top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows. Top is a dynamic display process where the current state can be refreshed continuously with the user key. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. More accurately, the top command provides real-time status monitoring of the system's processor. It will display the most "sensitive" CPU in the system. Task List. This command can be used by CPU. Memory usage and execution time to sort tasks, and many of the features of the command can be set through interactive commands or in personal customization files.
This command is detailed below:
Enter Top entry:
top - 09:14:56 up 264 days, 20:56, 1 user, load Average: 0.15, 0.08, 0.01tasks: 90 total, 1 running,   84 SLEEPING,   0 STOPPED,   0 ZOMBIECPU (s): 0.0%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.2%stMem: 377672k total, 322332k used, 55340k free, 32592k buffersswap: 397308k total, 67192k used, 330116k free, 71900k cached PID USER PR ni virt res shr s %cpu %mem time+ command 1 root 20 0 2856 656 388 S 0.0 0.2 0:49.40 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 7:15.20 ksoftirqd/0 4 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
First row
09:14:56: System Current time
Day 20:56: How much time has elapsed before the system is powered on
1 Users: current 2 user online
Load average:0.02, 0.04, 0.00: System 1-minute, 5-minute, 15-minute CPU load information
Second row
tasks: task;
Total: It is well understood that there are currently 87 tasks, that is, 87 processes.
1 Running:1 a process is running
Sleeping:86 a process sleep
0 stopped: Number of processes stopped
0 Zombie: Number of zombie processes
Third row
CPU (s): Indicates that this line shows CPU overall information
0.0%us: The user-state process consumes a percentage of CPU time and does not contain the CPU time that the Renice value is a negative task consumes.
0.7%sy: Percentage of CPU time consumed by the kernel
0.0%ni: The percentage of CPU that has changed the priority of the process
99.3%id: Percentage of idle CPU time
0.0%wa: Percentage of CPU time waiting for I/O
0.0%hi:cpu% Hard Interrupt Time
0.0%si:cpu Soft Interrupt Time percentage
Note: This shows that the data is the average of all CPUs, if you want to see the processing of each CPU, press 1, fold, press 1 again;
Row Four
Men: The Meaning of memory
8175320KK Total: Amount of physical memory
8058868k used: The amount of physical memory used
116452k Free: Idle amount of physical memory
283084k buffers: The amount of physical memory used as the kernel cache
Row Five.
Swap: Swap space
6881272K total: Swap area totals
4010444K used: Amount of swap area used
2870828k Free: Amount of idle swap area
4336992k cached: Total buffer swap Area
Process information
And here's the process information:
PID: ID of the process
USER: Process Owner
PR: The priority level of the process, the smaller the higher the priority is executed
Ninice: Value
VIRT: Virtual memory consumed by the process
RES: The physical memory occupied by the process
SHR: Shared memory used by the process
S: The state of the process. s for hibernation, R for running, Z for Zombie, n for the process priority value is negative
%CPU: Process Consuming CPU utilization
%MEM: The percentage of physical memory and total memory used by the process
Time+: The total CPU time that is consumed after the process is started, which is the cumulative value of the CPU usage time.
Command: Process start name
Top command Interactive operation instructions
The following is a list of some common top command action directives
Q: Exit top command <space>: Refresh now S: Set refresh interval c: Show command full mode T: : Show or hide process and CPU status information m: Show or hide memory status information L: Show or hide uptime information f: Increase or decrease the process display flag S: Cumulative mode, the CPU time occupied by a completed or exited subprocess is accumulated to the mite+p of the parent process: by% CPU Usage ranking T: by mite+ m: by%mem u: Specify show user process R: Modify process Renice value Kkill: Process I: Show only running processes W: Save settings for top to file ~/.TOPRC, The next boot will automatically invoke the settings of the TOPRC file. H: Help command. Q: Exit
This article is from the "is Wayward" blog, please be sure to keep this source http://9756063.blog.51cto.com/9746063/1612248
Linux Command Tools Top