首页   快速返回

proc中进程内存信息     所属分类 linux
/proc/[pid]

maps
smaps
statm
status
stat

maps

A file containing the currently mapped memory regions and their access permissions.


address           perms offset  dev   inode   pathname
08048000-08056000 r-xp 00000000 03:0c 64593   /usr/sbin/gpm
08056000-08058000 rw-p 0000d000 03:0c 64593   /usr/sbin/gpm
08058000-0805b000 rwxp 00000000 00:00 0
40000000-40013000 r-xp 00000000 03:0c 4165    /lib/ld-2.2.4.so
40013000-40015000 rw-p 00012000 03:0c 4165    /lib/ld-2.2.4.so
4001f000-40135000 r-xp 00000000 03:0c 45494   /lib/libc-2.2.4.so
            
"address" is the address space in the process that it occupies, 
"perms" is a set of permissions:

r = read
w = write
x = execute
s = shared
p = private (copy on write)

"offset"  is  the offset into the file/whatever, 
"dev" is the device (major:minor), 
"inode" is the inode on that device.  
0 indicates that no inode is associated with the memory region, 
as the case would be with BSS (uninitialized data).

Under Linux 2.0 there is no field giving pathname
              
                        
smaps

This file shows memory consumption for each of the process's mappings.  
For each of mappings there is a series of lines such as the following:

00400000-00401000 r-xp 00000000 fd:10 268435578                          /data01/soft/jdk1.8.0_151/bin/java
Size:                  4 kB
Rss:                   4 kB
Pss:                   4 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         4 kB
Private_Dirty:         0 kB
Referenced:            4 kB
Anonymous:             0 kB
AnonHugePages:         0 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd ex mr mw me dw sd 


7fd96c000000-7fd96d107000 rw-p 00000000 00:00 0 
Size:              17436 kB
Rss:               17436 kB
Pss:               17436 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:     17436 kB
Referenced:        17436 kB
Anonymous:         17436 kB
AnonHugePages:         0 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr mr mw me nr sd 


statm

Provides information about memory usage, measured in pages.


                  size       total program size
                             (same as VmSize in /proc/[pid]/status)
                  resident   resident set size
                             (same as VmRSS in /proc/[pid]/status)
                  share      shared pages (from shared mappings)
                  text       text (code)
                  lib        library (unused in Linux 2.6)
                  data       data + stack
                  dt         dirty pages (unused in Linux 2.6)
                  
                       
status
Provides much of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format 
that's easier for humans to parse.

Name:	java
Umask:	0022
State:	S (sleeping)
Tgid:	26662
Ngid:	0
Pid:	26662
PPid:	1
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	1000	1000	1000	1000
FDSize:	512
Groups:	993 1000 
VmPeak:	31316932 kB
VmSize:	31271544 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	21061952 kB
VmRSS:	21061888 kB
RssAnon:	21048012 kB
RssFile:	   13876 kB
RssShmem:	       0 kB
VmData:	31110048 kB
VmStk:	     132 kB
VmExe:	       4 kB
VmLib:	   17228 kB
VmPTE:	   42132 kB
VmSwap:	       0 kB
Threads:	194
SigQ:	0/127967
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000000003
SigCgt:	2000000181005ccc
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	0000001fffffffff
CapAmb:	0000000000000000
Seccomp:	0
Cpus_allowed:	ffff
Cpus_allowed_list:	0-15
Mems_allowed:	00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:	0
voluntary_ctxt_switches:	2
nonvoluntary_ctxt_switches:	2


* Name: Command run by this process.
* State: Current state of the process.  
"R (running)", "S (sleeping)", "D (disk sleep)", 
"T (stopped)", "T (tracing stop)", "Z (zombie)",  "X(dead)".
* Tgid: Thread group ID (i.e., Process ID).
* Pid: Thread ID (see gettid(2)).
* PPid: PID of parent process.
* TracerPid: PID of process tracing this process (0 if not being traced).
* Uid, Gid: Real, effective, saved set, and file system UIDs (GIDs).

* FDSize: Number of file descriptor slots currently allocated.

* Groups: Supplementary group list.

* VmPeak: Peak virtual memory size.
* VmSize: Virtual memory size.  虚拟内存大小
* VmLck: Locked memory size (see mlock(3)).
* VmHWM: Peak resident set size ("high water mark").

* VmRSS: Resident set size. 物理内存大小

* VmData, VmStk, VmExe: Size of data, stack, and text segments.

* VmLib: Shared library code size.

* VmPTE: Page table entries size (since Linux 2.6.10).

* Threads: Number of threads in process containing this thread.

* SigQ:  
This field contains two slash-separated numbers 
that relate to queued signals for the real user ID of this process.  
The first of these is the number of currently queued signals for this real user ID, 
and the second is the resource limit on the number of queued signals for this process 
 (see the description of RLIMIT_SIGPENDING in getrlimit(2)).

* SigPnd, ShdPnd: Number of signals pending for thread and for process as a whole (see pthreads(7) and signal(7)).

* SigBlk, SigIgn, SigCgt: Masks indicating signals being blocked, ignored, and caught (see signal(7)).

* CapInh, CapPrm, CapEff: Masks of capabilities enabled in inheritable, permitted, and effective sets (see capabilities(7)).

* CapBnd: Capability Bounding set (since kernel 2.6.26, see capabilities(7)).

* Cpus_allowed: Mask of CPUs on which this process may run (since Linux 2.6.24, see cpuset(7)).

* Cpus_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)).

* Mems_allowed: Mask of memory nodes allowed to this process (since Linux 2.6.24, see cpuset(7)).

* Mems_allowed_list: Same as previous, but in "list format" (since Linux 2.6.26, see cpuset(7)).

* voluntary_context_switches, nonvoluntary_context_switches: Number of voluntary and involuntary context switches (since Linux 2.6.23).

上一篇     下一篇
CAP和一致性协议

MySQL基础架构

java应用oom被kill排查记录

进程内存占用分析VSS/RSS/PSS/USS

elasticsearch5.0搜索偏好

elasticsearch5.0的一般建议