The top command shows the actual CPU usage, which, by default, shows the CPU-intensive task information on the server and refreshes every 5 seconds. It shows CPU usage, memory usage, swap memory, cache size, buffer size, process PID, user, command, and so on.
Description
The first five elements are the statistical information of the whole system.
The first line is the task queue information, with the execution result of the uptime command.
11:18:26: The current system time, based on the difference in the value of the change, you can calculate the top of the refresh interval of seconds.
Up days,18:35: The time the system is running.
1 User: Number of currently logged on users.
Load average:0.00, 0.00, 0.00 System Load, which is the average length of the task queue. is to check the number of active processes every 5 seconds and then calculate the values by the specific algorithm. If this number is divided by the number of logical CPUs, the result above 5 indicates that the system is overloaded.
Second Line Tasks are process information.
118 Total: Number of processes.
1 Running: Number of running processes.
117 The number of sleeping sleep processes.
0 stopped the number of processes stopped.
0 Zombie Number of zombie processes.
Third line The CPU (s) is the CPU information. Note: Press "1" key to display all CPU information.
0.0%us: The user state uses the CPU to occupy the time ratio.
0.1%sy: The system state uses CPU time ratio.
0.0% ni: The user-state CPU time ratio used by the nice-weighted process. Nice: Process priority correction positive, can be negative, new priority = Original priority +nice corrected value.
99.9%id: Idle CPU time ratio.
0.0%wa: Wait for the input/output CPU time ratio. If a machine WA is too high, it could be a problem with disk I/O and further analysis using Iostat.
0.0%hi: Hard interrupt consumes CPU time ratio.
0.0%si: Soft interrupt consumes CPU time ratio. If the program is not a problem, then there is no hi and Si.
0.0%st: The time that the virtual machine stole. A physical can be virtualized out of multiple virtual machines, on one of the virtual machine with top view found St is not 0, it means that there are so many CPU time is scheduled to me this virtual machine, but due to some kind of virtual technology, the CPU time allocated to other virtual machines. This is called stealing. See: http://melody-dc.com/2015/11/21/%E7%90%86%E8%A7%A3CPU-steal-time/
The last two lines are memory information.
Mem:
8061376k Total: Amount of physical memory. Total = used + free.
1298152k used: The total amount of physical memory used.
6763224k Free: The total amount of physical memory that is idle.
296192k buffers: The amount of memory used as the kernel cache.
Swap:
6709240k Total: The amount of memory in the swap area.
0k used: The total number of swap areas used. If this value is constantly changing, it means that the kernel is constantly exchanging data for memory and swap, which is really not enough memory.
6709240k Free: The total number of idle swap areas.
332452k Cached: The total number of buffered swap areas. The in-memory content is swapped out to the swap area and then swapped in to 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, it is no longer necessary to write to the swap area.
Process Information Area
Pid |
Process ID |
PPID |
Parent Process ID |
USER |
User name of the process owner |
PR |
Priority level |
NI |
Nice value, i.e., priority correction, negative for high priority, positive for low-priority |
VIRT |
The total amount of virtual memory used by the process, in kilobytes. Virt=swap+res |
Res |
The size, in kilobytes, of the physical memory that the process used and was not swapped out. Res=code+data |
Shr |
Shared memory size, in kilobytes |
S |
Process state. R:task_running executable State (running + executable but not executing process) S: An interruptible sleep state D: Non-disruptive sleep status T: Pause status or Trace status (signal) Z: Exit status, Process becomes zombie process X: Exit status, process is about to be destroyed See: http://blog.chinaunix.net/uid-28811518-id-4099248.html |
%cpu |
CPU time consumption percentage last updated to current |
%MEM |
Percentage of physical memory used by the process |
time+ |
Total CPU time used by the process, Unit 1/100 sec |
CODE |
The amount of physical memory the executable code occupies, in kilobytes |
DATA |
The amount of physical memory that is used by parts other than executable code (data segment + stack), in kilobytes |
COMMAND |
Command name/command line |
Press "F" key to select the displayed content, press A-Z to show or hide the corresponding column, and then press ENTER to determine.
Linux Performance Test Command-----Top