The meaning of the Linux top command virt,res,shr,data

Source: Internet
Author: User

Virt:virtual Memory usage Virtual RAM
1. The process "required" virtual memory size, including the library, code, data, etc. used by the process
2, if the process to apply for 100m of memory, but the actual use of only 10m, then it will grow 100m, rather than the actual use of the volume

Res:resident Memory Usage resident RAM
1. The memory size currently used by the process, but does not include swap out
2. Sharing with other processes
3, if the application of 100m of memory, the actual use of 10m, it only grows 10m, and virt opposite
4, about the memory consumption of the library, it only statistics the size of the loaded library file memory

Shr:shared Memory Shared
1, in addition to the shared memory of the process itself, also includes the shared memory of other processes
2, although the process uses only a few shared library functions, but it contains the entire size of the shared library
3. Calculate the physical memory size formula that a process occupies: res–shr
4, swap out, it will be lowered

DATA
1, the memory occupied by the data. If top is not displayed, press the F key to display it.
2, the real data space required by the program is really in operation to use.

In the top run, you can control how processes are displayed through the internal commands of top. The internal commands are as follows:
S-Change the screen update frequency
L – Turn off or turn on the first section of the first line top information representation
T-Close or turn on the first part of the second line the Cpus information representation of the Tasks and the third row
M – Turn off or turn on the first part of the four-line Mem and fifth line Swap information representation
n – the list of processes in the order of the PID size
P – List of processes in the order of CPU utilization
M – List of processes in the order of memory utilization
H – Display Help
n – Set the number of processes that are displayed in the process list
Q – Exit Top
S-Change the screen update cycle

Ordinal column name meaning
A PID process ID
b PPID Parent Process ID
C ruser Real User name
D UID Process Owner's user ID
e username of user process Owner
Group name of the F group Process owner
The terminal name of the G TTY boot process. Processes that are not started from the terminal are displayed as?
H PR-Priority
I NI nice value. Negative values indicate high priority, positive values indicate low priority
The last CPU used by J P is meaningful only in a multi-CPU environment
K%cpu CPU time consumption percentage last updated to current
The total CPU time, in seconds, used by the timing process
The total CPU time used by the M time+ process, in units 1/100 seconds
n the percentage of physical memory used by the%MEM process
o The total amount of virtual memory used by the VIRT process, in kilobytes. Virt=swap+res
The P swap process uses the size of the virtual memory, which is swapped out, in kilobytes.
The size of the physical memory, in kilobytes, that the Q RES process uses and has not been swapped out. Res=code+data
R code executable code occupies the physical memory size, in kilobytes
The amount of physical memory that is used outside of the S data executable code (data segment + stack), in kilobytes
T SHR shared memory size, in kilobytes
U Nflt page Error count
V NDRT the number of pages that have been modified in the last write to now.
W S Process state. (d= non-disruptive sleep status, r= run, s= sleep, t= track/Stop, z= zombie process)
x command name/command line
Y Wchan If the process is sleeping, the system function name in sleep is displayed
Z Flags task Flag, reference sched.h

By default, only the more important PID, USER, PR, NI, VIRT, RES, SHR, S,%cpu,%MEM, time+, and COMMAND columns are displayed. You can change the display by using the following shortcut keys.

The F key allows you 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 confirm.
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.
Press the uppercase F or O key, and then press A-Z to sort the process by the appropriate column. The uppercase R key can reverse the current sort.

The meaning of the Linux top command virt,res,shr,data

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.