TOP Command explanation

Source: Internet
Author: User

1. Role
The top command is used to display the processes in execution. The permission is granted to all users.
2. Format
Top [-] [d delay] [Q] [C] [s] [s] [N]
3. Main Parameters
D: Specify the update interval, in seconds.
Q: there are no delayed updates. If a Super User exists, the top command is executed in the highest priority order.
C: displays the complete process path and name.
S: The accumulation mode, which accumulates the CPU time of the completed or disappearing sub-itinerary.
S: security mode.
I: no idle (idle) or useless (zombie) itinerary is displayed.
N: displays the number of updates. After the update is completed, the system will exit the top.
4. Description
The top command is a major command for Linux system management. It can obtain a lot of information. Here we use figure 1 to describe the information it provides.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/47/DF/wKiom1QCidXhIGEuAAQwHTzHBYs952.jpg "Title =" lh97 ~ Ojkxw.rksfm(vi[[he.jpg "alt =" wkiom1qcidxhigeuaaqwhtzhbys952.jpg "/>

In Figure 1,

The first line indicates the current time, system startup time, number of users logged on to the current system,
Average load.

The second line shows all started processes, currently running, suspended and useless processes.

The third line shows the current CPU usage,
This includes the system usage, user usage, and idle. The fourth line shows the usage of physical memory, including the total available memory, used memory, idle memory, and memory occupied by the buffer.

The fifth line shows the swap partition usage, including the total swap partition, used, idle, and cache size.

The sixth line displays the largest number of items. The detailed explanations are listed below.
PID (process ID): process ID.
User: the user name of the process owner.
PR: process priority.
Ni: the priority value of the process.
Virt: Virtual Memory occupied by the process.
Res: The physical memory occupied by the process.
SHR: the shared memory value used by the process.
S: Process status. s indicates sleep, r indicates running, Z indicates frozen, and N indicates that the priority of the process is negative.
% CPU: CPU usage occupied by the process.
% Mem: Percentage of physical memory and total memory occupied by the process.
Time +: The total CPU time occupied by the process after it is started.
Command: the name of the startup command that the process starts. If this line does not appear, the process has a complete command line.
Some interactive commands can be used to complete other parameter functions during the use of the top command. These commands are started by using the shortcut key.
: Refresh immediately.
P: sort by CPU usage.
T: sort by time and accumulated time.
Q: exit the TOP command.
M: Switch to Display memory information.
T: process and CPU status information is displayed during switchover.
C: Switch the display command name and the complete command line.
M: sort by memory size.
W: Write the current settings ~ /. Toprc file. This is a recommended method for writing top configuration files.
As you can see, the top command is a powerful tool for monitoring the system, especially for system administrators. However, it consumes a lot of system resources.

5. Application Instance
The top command can be used to monitor the process of a specified user. By default, the process of all users is monitored. If you want to view the status of a specified user, press the "U" key on the terminal and enter the user name, the system switches to the process running interface of the specified user, as shown in figure 2.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/47/DF/wKiom1QCiwvDMHPiAAFujTAjp3Q756.jpg "Title =" %wz4policy61%tl1p64qa_u'g%l.jpg "alt =" wkiom1qciwvdmhpiaafujtajp3q756.jpg "/>

This article is from the "I learn how to use" blog, please be sure to keep this source http://593095349.blog.51cto.com/8497121/1547052

TOP Command explanation

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.