Top dynamic Display in Linux

Source: Internet
Author: User
Tags sorts terminates cpu usage

One Topis a dynamic display process in which the current state can be refreshed continuously by a user key. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. More accurately, the top command provides real-time status monitoring of the system's processor. It will display the most "sensitive" CPU in the system Task List. This command can be used by CPU. Memory usage and execution time to sort tasks, and many of the features of the command can be set through interactive commands or in personal customization files.



Description:The whole information of the former five elements statistic system is the process information area.

1 First line: Same as uptime, respectively Current time 13:48 system run time 3 days number of currently logged on users 1userSystem load Load Average:, that is, the average length of the task queue

2 second to third behavior process and CPU information. When there are multiple CPUs, these contents may be more than two lines
tasks:96 Total Process Totals
1 running number of running processes
Number of processes for sleeping sleep
0 Number of processes stopped stopped
0 Zombie Number of zombie processes

CPU (s): 0.0% US user space consumes CPU percent view CPU usage
1.0% SY core space CPU percent occupied
0.0% CPU Percentage of processes that have changed priority within NI user process space
100.0% ID Idle CPU percent
0.0% wa wait for the input output CPU time percentage
0.0% hi
0.0% si
0.0% St

3 last two Behavior memory information
mem:506708k Total Physical Memory
Total physical memory used by 477080k used
29628k free Memory Total
The amount of memory that 113736k buffers uses as the kernel cache
Total swap area of swap:1015800k
Total swap area used by used
1015688k Free Swap Area total
169384k cached buffered Swap area total
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.
This value is thecontent already exists in memoryThe size of the swap area.
When the corresponding memory is swapped out again, it is no longer necessary to write to the swap area.

4 Process Information Area
PID Process ID PPID parent Process ID
PR-Priority
NI Nice value negative indicates high priority, positive values indicate low priority
The total amount of virtual memory used by the VIRT process, in kilobytes. Virt=swap+res
The size, in kilobytes, of the physical memory used by the RES process and not swapped out. Res=code+data
SHR shared memory size, in kilobytes
S Process StateD= Non-interruptible sleep stateR= RunS= SleepT= Trace/StopZ= Zombie Process
%cpu percentage of CPU time that was last updated to current
The%MEM process uses thePhysical MemoryPercentage
Total CPU time used by the time+ process, Unit 1/100 sec
Command name/command line
More than two, only the more important PID, USER, PR, NI, VIRT, RES, SHR, S,%cpu,%MEM, time+, and COMMAND columns are shown by default. You can change the display by using the following shortcut keys.
1 byFKey to select what is displayed. Press the F key to display a list of columns, press A-Z to show or hide the corresponding column, and then press ENTER to determine

2 press the o key to change the order in which the columns are displayed. A-Z in the lower case moves the corresponding column to the right, while the uppercase A-Z moves the corresponding column to the left. Finally, press ENTER to confirm.

3 in UppercaseFOrOKey, and then press A-Z to sort the process by the appropriate column. and uppercase.RKey to reverse the current sort.

4 Using Parameters:
d Specifies the interval between every two times the screen information is refreshed. Of course the user can use the s interactive command to change it.
P only monitors the state of a process by specifying the monitoring process ID.
Q This option will cause top to refresh without any delay. If the calling program has Superuser privileges, top will run at the highest possible priority.
S Specifies the cumulative mode
s enables the top command to run in Safe mode. This removes the potential danger of interactive commands.
I make top not show any idle or zombie processes.
C Displays the entire command line instead of just displaying the command name
5 top Interactive commands when using:
ctrl+lErase and rewrite the screen.
  h or?Display the help screen and give a brief summary of the commands.
   kTerminates a process. The user will be prompted for the process PID to be terminated and what signal needs to be sent to the process. The normal termination process can use a 15 signal, and if not, use signal 9 to force end the process. The default value is signal 15. This command is masked in safe mode.
   IIgnore idle and zombie processes. This is a switch-type command.
   QExits the program.
   RReschedule the priority level of a process. The user is prompted to enter the process PID that needs to be changed and the process priority value that needs to be set. Entering a positive value lowers the priority and, conversely, it gives the process a higher priority. The default value is 10.
   SSwitch to cumulative mode.
   sChange the delay time between two refreshes. The user will be prompted to enter a new time in S. If there are decimals, it is converted into M S. Enter a value of 0 and the system will refresh continuously, the default value is 5 S. It is important to note that if you set too small a time, it is likely to cause a constant refresh, so it is too late to see the display, and the system load will be greatly increased.
   F or FAdd or remove items from the current display.
   o or OChange the order in which items are displayed.
   LToggles the display of average load and start time information.
   mToggles display memory information.
   TToggles the display of process and CPU status information.
   CToggles the display of the command name and the full command line.
   MSorts based on the size of the resident memory.
   PSorts according to the percentage size of CPU usage.
   TSort by Time/cumulative time.
WWrites the current settings to the ~/.TOPRC file. This is the recommended way to write top configuration files

Original address: http://www.51testing.com/?uid-89657-action-viewspace-itemid-234799

Top dynamic Display in Linux

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.