TOP command usage

Source: Internet
Author: User
View the display result of top

The result of the top command is as follows:

top - 01:06:48 up  1:22,  1 user,  load average: 0.06, 0.60, 0.48Tasks:  29 total,   1 running,  28 sleeping,   0 stopped,   0 zombieCpu(s):  0.3% us,  1.0% sy,  0.0% ni, 98.7% id,  0.0% wa,  0.0% hi,  0.0% siMem:    191272k total,   173656k used,    17616k free,    22052k buffersSwap:   192772k total,        0k used,   192772k free,   123988k cached  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND 1379 root      16   0  7976 2456 1980 S  0.7  1.3   0:11.03 sshd14704 root      16   0  2128  980  796 R  0.7  0.5   0:02.72 top    1 root      16   0  1992  632  544 S  0.0  0.3   0:00.90 init    2 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
Statistical information area

The first five lines are the overall statistics of the system. The first line is the task queue information, which is the same as the execution result of the uptime command. The content is as follows:

01:06:48 Current Time
Up :22 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.

Second and Third, information about the process 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  

Memory information of the last two behaviors. 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,
The value isThe content already exists in the memory.The size of the swap area.
When the corresponding memory is swapped out again, you do not have to write data to the swap zone.
Process Information area

The details of each process are displayed at the bottom of the statistics area. First, let's take a look at the meaning of each column.

Serial number Column name Description
A PID Process ID
B Ppid Parent process ID
C Ruser Real User Name
D UID User ID of the process owner
E User User Name of the process owner
F Group Group Name of the process owner
G Tty The terminal name of the startup process. Processes not started from the terminal are displayed?
H PR Priority
I Ni Nice value. A negative value indicates a high priority, and a positive value indicates a low priority.
J P The last CPU used is only meaningful in multiple CPU environments.
K % CPU CPU usage from the last update to the present
L Time Total CPU time used by the process, in seconds
M Time + Total CPU time used by the process, in 1/100 seconds
N % Mem Process UsedPhysical memoryPercentage
O Virt Total virtual memory used by the process, in KB. Virt = swap + Res
P Swap In the virtual memory used by the process, the swap size, in KB.
Q Res Physical memory used by the process, not swapped out, in KB. Res = code + Data
R Code Executable code usagePhysicalMemory size, in KB
S Data Occupied by parts other than executable code (Data Segment + stack)PhysicalMemory size, in KB
T SHR Size of shared memory, in KB
U Nflt Page error count
V MCM t The number of pages that have been modified since the last write to the present.
W S Process status.
D= Uninterrupted sleep
R= Run
S= Sleep
T= Trail/stop
Z= Zombie Process
X Command Command name/command line
Y Wchan If the process is sleeping, the system function name displayed in sleep
Z Flags Task flag, refer to sched. h

By default, only important PID, user, PR, Ni, virt, res, SHR, S, % CPU, % MEM, time +, and command columns are displayed. You can use the shortcut keys below to change the display content.

Change display content

PassFKey to select the displayed content. Press F to display the column list. Press A-Z to display or hide the corresponding column, and press enter to confirm.

PressOThe key can change the Column Display sequence. A lower-case a-Z can move the corresponding column to the right, while an upper-case A-Z can move the corresponding column to the left. Press enter.

In upper caseFOrOAnd then press a-Z to sort the process by the corresponding column. In upper caseRThe key can reverse the current sorting.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.