How to use the top command in Linux (1)

Source: Internet
Author: User

I collected two articles about how to use the top command in Linux. In general, the top command is mainly used to view the usage of various processes and system resources in the Linux system. It is very useful in monitoring the performance of the Linux system, the following is my collection of articles on the Linux top Command, hoping to help you

As one of the most common and important Linux system monitoring tools in daily management, top can dynamically observe the system process status. The top command displays many items. The default value is to update every 5 seconds. You can press the q key to exit. The displayed items are:-B: Run in batch mode. -C: displays the command line for executing the task. -D: Set the delay time. -H: Help. -H: displays threads. Displays the threads generated by all processes. -I: displays idle processes. -N: number of executions. Generally used in combination with-B. -U: monitors user-related processes. -U: monitors user-related processes. -P: monitors the specified process. -S: Safe mode operation. -S: cumulative time mode. -V: displays the top version and exits. -M: automatically displays the memory unit k/M/G ).

Uptime indicates the system startup time, running time, and three average load values: 1 second, 5 seconds, and 15 seconds ).

Total number of processes running since the last refresh. These processes are divided into running, sleep, and stopped processes.

CPU states displays the percentage of CPU time used in various situations, such as user mode, system mode, and priority process. The time consumed by the priority process is also included in the user and system time. The total percentage will be greater than 100%.

Mem memory usage statistics, including the total available memory, idle memory, used memory, shared memory and cache memory.

Swap space statistics, including the total Swap space, available Swap space, used Swap space.

PID: ID of each process, PPID: parent process ID of each process. UID: The UID of each process owner, the USER name of each process owner, the priority level of each process in PRI, and the priority value of the process in ni. SIZE: the code SIZE of the process, the data SIZE, and the total SIZE of the stack space. The unit is KB. TSIZE. This is a strange value for Kernel processes. DSIZE data and stack size. TRS text resident size. D. The page project marked as "not clean. The size of the library page used by LIB. It does not work for the ELF process. RES the total number of physical memory occupied by the process, in KB. SHARE the amount of memory used by the process. STAT the status of the process. S = sleep; D = non-disruptive sleep; R = running; Z = dead; T = stopped or tracked. TIME the total cpu time occupied by the process since it was started. If you enter the cumulative mode, the TIME also includes the TIME occupied by the process sub-process. The title is changed to CTIME. % CPU the percentage of CPU time and total time occupied by the process since the last refresh. % MEM the percentage of physical memory occupied by the process to the total memory. COMMAND indicates the COMMAND name of the process. If one line does not show any more, the COMMAND is intercepted. The process in the memory has a complete command line.

From: http://www.linux521.com/2009/system/201201/17945.html


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.