Although the ps command can display a lot of information about the machine running status, it only provides a snapshot of the machine status when the ps command is executed
Introduction
Although the ps command can display a lot of information about the machine running status, it only provides a snapshot of the machine status when the ps command is executed.
To view the dynamic view of machine running status, use the top command: [allyes_op @ allyes ~] $ Top.
The top program will continuously update and display the current information of the system process in the form of a list in the order of process activity (updated once every 3 seconds by default ).
It is mainly used to view the running status of the highest process in the system. The top name also comes from this.
==========================================================
The top command displays two parts.
Top Display
The system overall status information is displayed on the top.
Top-12:06:32 up 333 days, 1 user, load average: 0.00, 0.00, 0.00
Task: 198 total, 1 running, 197 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.0% us, 0.0% sy, 0.0% ni, 99.8% id, 0.2% wa, 0.0% hi, 0.0% si, 0.0% st
Mem: 4044144 k total, 4006032 k used, 38112 k free, 756872 k buffers
Swap: 4192924 k total, 160 k used, 4192764 k free, 2796696 k cached
==========================================================
Fields in system overall status information
Line |
Field |
Description |
1 |
Top |
Program Name |
1 |
12:06:32 |
Current time |
1 |
Up 333 days |
Normal running time |
1 |
1 user |
One user has logged on |
1 |
Load average: 0.00, 0.00, 0.00 |
Load mean. |
2, 3 |
Task: 198 total, 1 running, 197 sleeping, 0 stopped, 0 zombie Cpu (s): 0.0% us, 0.0% sy, 0.0% ni, 99.8% id, 0.2% wa, 0.0% hi, 0.0% si, 0.0% st |
Displays the number of processes and the status of each process. |
4 |
Mem: 4044144 k total, 4006032 k used, 38112 k free, 756872 k buffers |
For example, the usage of RAM (random access memory) |
5 |
Swap: 4192924 k total, 160 k used, 4192764 k free, 2796696 k cached |
Display the usage of swap space (virtual memory) |
==========================================================
Help instruction
H
Show Help page
Q
Exit top command