Linux Top commands (1)
TOP is a dynamic display process. You can press the buttons to refresh the current status. if you execute this command on the foreground, it excludes the foreground until the user terminates the program. more accurately, the top command provides real-time monitoring of the status of the system processor. it displays the list of CPU-sensitive tasks in the system. this command can be used by CPU. the memory usage and execution time are used to sort tasks. Many features of this command can be set through interactive commands or in a custom file.
- top - 12:38:33 up 50 days, 23:15, 7 users, load average: 60.58, 61.14, 61.22
- Tasks: 203 total, 60 running, 139 sleeping, 4 stopped, 0 zombie
- Cpu(s) : 27.0%us, 73.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
- Mem: 1939780k total, 1375280k used, 564500k free, 109680k buffers
- Swap: 4401800k total, 497456k used, 3904344k free, 848712k cached
- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 4338 oracle 25 0 627m 209m 207m R 0 11.0 297:14.76 oracle
- 4267 oracle 25 0 626m 144m 143m R 6 7.6 89:16.62 oracle
- 3458 oracle 25 0 672m 133m 124m R 0 7.1 1283:08 oracle
- 3478 oracle 25 0 672m 124m 115m R 0 6.6 1272:30 oracle
- 3395 oracle 25 0 672m 122m 113m R 0 6.5 1270:03 oracle
- 3480 oracle 25 0 672m 122m 109m R 8 6.4 1274:13 oracle
- 3399 oracle 25 0 672m 121m 110m R 0 6.4 1279:37 oracle
- 4261 oracle 25 0 634m 100m 99m R 0 5.3 86:13.90 oracle
- 25737 oracle 25 0 632m 81m 74m R 0 4.3 272:35.42 oracle
- 7072 oracle 25 0 626m 72m 71m R 0 3.8 6:35.68 oracle
- 16073 oracle 25 0 630m 68m 63m R 8 3.6 175:20.36 oracle
- 16140 oracle 25 0 630m 66m 60m R 0 3.5 175:13.42 oracle
- 16122 oracle 25 0 630m 66m 60m R 0 3.5 176:47.73 oracle
- 786 oracle 25 0 627m 63m 63m R 0 3.4 1:54.93 oracle
- 4271 oracle 25 0 627m 59m 58m R 8 3.1 86:09.64 oracle
- 4273 oracle 25 0 627m 57m 56m R 8 3.0 84:38.20 oracle
- 22670 oracle 25 0 626m 50m 49m R 0 2.7 84:55.82 oracle
I. TOP five rows of statistics
The first five lines in the statistical information area are the overall statistical information of the system.
1. The first line is the task queue information.
Same as the execution result of the uptime command:
[Root @ localhost ~] # Uptime
13:22:30 up 8 min, 4 users, load average: 0.14, 0.38, 0.25
The content is as follows:
| 12:38:33 |
Current Time |
| Up 50 days |
System running time, in the format of minutes |
| 1 user |
Current Login User count |
| Load average: 0.06, 0.60, 0.48 |
System load, that is, the average length of the task queue. The three values are the average values from 1 minute, 5 minutes, and 15 minutes ago to the present. |
2. Information of the second and third behavior processes and CPU
When multiple CPUs exist, the content may exceed two rows. The content is as follows:
| Tasks: 29 total |
Process count |
| 1 running |
Number of Running Processes |
| 28 sleeping |
Number of sleep Processes |
| 0 stopped |
Number of stopped Processes |
| 0 zombie |
Number of zombie Processes |
| Cpu (s): 0.3% us |
CPU usage percentage of user space |
| 1.0% sy |
CPU usage of kernel space |
| 0.0% ni |
CPU usage percentage of processes that have changed their priorities in the process space |
| 98.7% id |
Idle CPU percentage |
| 0.0% wa |
Percentage of CPU time waiting for Input and Output |
| 0.0% hi |
|
| 0.0% si |
|
3. The memory information of the behavior in the 4th and 5th sections.
The content is as follows:
| Mem: 191272 k total |
Total physical memory |
| 173656 k used |
Total physical memory used |
| 17616 k free |
Total idle memory |
| 22052 k buffers |
Memory Used as kernel Cache |
| Swap: 192772 k total |
Total number of swap Areas |
| 0 k used |
Total number of swap zones used |
| 192772 k free |
Total number of idle swap Areas |
| 123988 k cached |
The total number of buffer swap areas. The content in the memory is swapped out to the swap zone and then into the memory, but the used swap zone has not been overwritten. This value is the size of the SWAp zone where the content already exists. When the corresponding memory is swapped out again, you do not have to write data to the swap zone. |