Top Command monitors the overall performance of processes and Linux

Source: Internet
Author: User
Top command is one of the most popular Unix/Linux performance tools. The system administrator can run the top command to monitor the overall performance of processes and Linux. Top command is one of the most popular Unix/Linux performance tools. The system administrator can run the top command to monitor the overall performance of processes and Linux. Permission: usage of all users: top [-] [d delay] [q] [c] [S] [s] [n] description: does the process dynamically display in real time? D: change the display update speed, or press sq in the interactive command column: no latency. if the user has superuser permissions, then, top performs the c: Switch display mode in the highest priority order. There are two modes. one is to display only the name of the execution file, the other is to display the complete path and name S: accumulation mode, which will accumulate the CPU time of the completed or disappearing sub-itinerary (dead child process) s: security mode, cancel the negotiated commands to avoid potential crisis I: Do not display any idle or useless (zombie) itinerary n: number of updates, and then exit topb: the batch file mode, used together with the "n" parameter, can be used to output the top result to the file. example: Display the file to exit after 10 updates; the top-n 10 user will not be able to use the negotiated command to run the following command on the itinerary: top-s will input the result of the second update display to the name "top. in the log file: top-n 2-B> top. log describes the following top items:
Top-10:38:10 up 4 days, 1 user, load average: 0.23, 0.14, 0.10
Task: 429 total, 1 running, 428 sleeping, 0 stopped, 0 zombie
Cpu (s): 0.0% us, 0.1% sy, 0.0% ni, 99.8% id, 0.0% wa, 0.0% hi, 0.0% si, 0.0% st
Mem: 20605080 k total, 2020484 k used, 18584596 k free, 324324 k buffers
Swap: 22708216 k total, 0 k used, 22708216 k free, 546292 k cachedPID user pr ni virt res shr s % CPU % mem time + COMMAND the first line:
10:38:10-current system time
Up 4 days,-the system has been running for 4 days, 17 hours, and 37 minutes (no restart during this period)
1 user-currently one user is logged on to the system
Load average: 0.23, 0.14, 0.10-load average, the three numbers after which are 1 minute, 5 minutes, and 15 minutes respectively. Row 2:
Tasks-task (process), the system now has a total of 429 processes, of which one is running, 428 are sleeping, and 0 are stoped, zombie status (zombie) has 0. Row 3: cpu status
0.0% us-percentage of CPU used by user space.
0.1% sy-percentage of CPU occupied by kernel space.
0.0% ni-percentage of CPU used by processes with changed priorities
99.8% id-percentage of idle CPU
0.0% percentage of CPU occupied by wa-IO wait
0.0% hi-percentage of CPU used by Hardware IRQ
0.0% si-percentage of CPU used by Software Interrupts row 4: Memory status
20605080 k total-total physical memory (20 GB)
2020484 k used-total memory in use (2 GB)
18584596 k free-total idle memory (18 M)
324324 k buffers-cache memory (320 MB) Level 5: swap partition
22708216 k 20 total-total swap zone (22 GB)
0 used-total number of swap areas used (0 M)
22708216 k free-total number of idle swap areas (22 GB)
546292 k cached-the total number of buffer swap zones (500 MB). the seventh line is as follows: status monitoring of each process (task)
PID-process id
USER-Process Owner
PR-process priority
NI-nice value. A negative value indicates a high priority, and a positive value indicates a low priority.
VIRT-total virtual memory used by the process, in kb. VIRT = SWAP + RES
RES-physical memory used by the process, not swapped out, in kb. RES = CODE + DATA
SHR-shared memory size, in kb
S-process status. D = non-disruptive sleep state R = Running S = sleep T = tracking/stopping Z = botnets
% CPU-percentage of CPU time occupied since the last update
% MEM-percentage of physical memory used by the process
TIME +-total cpu time used by the process, in the unit of 1/100 seconds
COMMAND-process name (COMMAND name/COMMAND line) special usage 1. multi-U multi-core CPU monitoring in the top basic view, press the keyboard number "1" to monitor the status of each logical CPU (not physical CPU) 2. highlight the current running process and press "B" on the keyboard (enable/disable the highlighted effect). 3. use h to see more tips.
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.