|
|
96cc1f |
From cfd0231bfc49d6f040f9ec90243ae35e1af216d0 Mon Sep 17 00:00:00 2001
|
|
|
96cc1f |
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
|
|
|
96cc1f |
Date: Wed, 22 Aug 2018 12:35:44 +0200
|
|
|
96cc1f |
Subject: [PATCH 2/2] proc.5: document missing fields in /proc/[pid]/smaps and
|
|
|
96cc1f |
/proc/[pid]/status
|
|
|
96cc1f |
|
|
|
96cc1f |
---
|
|
|
96cc1f |
man-pages/man5/proc.5 | 198 +++++++++++++++++++++++++++++++++++-------
|
|
|
96cc1f |
1 file changed, 168 insertions(+), 30 deletions(-)
|
|
|
96cc1f |
|
|
|
96cc1f |
diff --git a/man-pages/man5/proc.5 b/man-pages/man5/proc.5
|
|
|
96cc1f |
index e4d2fd7..fa8505d 100644
|
|
|
96cc1f |
--- a/man-pages/man5/proc.5
|
|
|
96cc1f |
+++ b/man-pages/man5/proc.5
|
|
|
96cc1f |
@@ -961,28 +961,93 @@ For each of mappings there is a series of lines such as the following:
|
|
|
96cc1f |
.in +4n
|
|
|
96cc1f |
.nf
|
|
|
96cc1f |
|
|
|
96cc1f |
-08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
|
|
|
96cc1f |
-Size: 464 kB
|
|
|
96cc1f |
-Rss: 424 kB
|
|
|
96cc1f |
-Shared_Clean: 424 kB
|
|
|
96cc1f |
-Shared_Dirty: 0 kB
|
|
|
96cc1f |
-Private_Clean: 0 kB
|
|
|
96cc1f |
-Private_Dirty: 0 kB
|
|
|
96cc1f |
+00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
|
|
|
96cc1f |
+Size: 552 kB
|
|
|
96cc1f |
+Rss: 460 kB
|
|
|
96cc1f |
+Pss: 100 kB
|
|
|
96cc1f |
+Shared_Clean: 452 kB
|
|
|
96cc1f |
+Shared_Dirty: 0 kB
|
|
|
96cc1f |
+Private_Clean: 8 kB
|
|
|
96cc1f |
+Private_Dirty: 0 kB
|
|
|
96cc1f |
+Referenced: 460 kB
|
|
|
96cc1f |
+Anonymous: 0 kB
|
|
|
96cc1f |
+AnonHugePages: 0 kB
|
|
|
96cc1f |
+Swap: 0 kB
|
|
|
96cc1f |
+KernelPageSize: 4 kB
|
|
|
96cc1f |
+MMUPageSize: 4 kB
|
|
|
96cc1f |
+KernelPageSize: 4 kB
|
|
|
96cc1f |
+MMUPageSize: 4 kB
|
|
|
96cc1f |
+Locked: 0 kB
|
|
|
96cc1f |
+VmFlags: rd ex mr mw me dw
|
|
|
96cc1f |
|
|
|
96cc1f |
.fi
|
|
|
96cc1f |
.in
|
|
|
96cc1f |
The first of these lines shows the same information as is displayed
|
|
|
96cc1f |
for the mapping in
|
|
|
96cc1f |
.IR /proc/[pid]/maps .
|
|
|
96cc1f |
-The remaining lines show the size of the mapping,
|
|
|
96cc1f |
-the amount of the mapping that is currently resident in RAM,
|
|
|
96cc1f |
+The following lines show the size of the mapping,
|
|
|
96cc1f |
+the amount of the mapping that is currently resident in RAM ("Rss"),
|
|
|
96cc1f |
+the process's proportional share of this mapping ("Pss"),
|
|
|
96cc1f |
the number of clean and dirty shared pages in the mapping,
|
|
|
96cc1f |
and the number of clean and dirty private pages in the mapping.
|
|
|
96cc1f |
-
|
|
|
96cc1f |
-This file is present only if the
|
|
|
96cc1f |
-.B CONFIG_MMU
|
|
|
96cc1f |
-kernel configuration
|
|
|
96cc1f |
-option is enabled.
|
|
|
96cc1f |
+"Referenced" indicates the amount of memory currently marked as
|
|
|
96cc1f |
+referenced or accessed.
|
|
|
96cc1f |
+"Anonymous" shows the amount of memory
|
|
|
96cc1f |
+that does not belong to any file.
|
|
|
96cc1f |
+"Swap" shows how much
|
|
|
96cc1f |
+would-be-anonymous memory is also used, but out on swap.
|
|
|
96cc1f |
+.IP
|
|
|
96cc1f |
+The "KernelPageSize" line (available since Linux 2.6.29)
|
|
|
96cc1f |
+is the page size used by the kernel to back the virtual memory area.
|
|
|
96cc1f |
+This matches the size used by the MMU in the majority of cases.
|
|
|
96cc1f |
+However, one counter-example occurs on PPC64 kernels
|
|
|
96cc1f |
+whereby a kernel using 64kB as a base page size may still use 4kB
|
|
|
96cc1f |
+pages for the MMU on older processors.
|
|
|
96cc1f |
+To distinguish the two attributes, the "MMUPageSize" line
|
|
|
96cc1f |
+(also available since Linux 2.6.29)
|
|
|
96cc1f |
+reports the page size used by the MMU.
|
|
|
96cc1f |
+.IP
|
|
|
96cc1f |
+The "Locked" indicates whether the mapping is locked in memory
|
|
|
96cc1f |
+or not.
|
|
|
96cc1f |
+.IP
|
|
|
96cc1f |
+The "VmFlags" line (available since Linux 3.8)
|
|
|
96cc1f |
+represents the kernel flags associated with the virtual memory area,
|
|
|
96cc1f |
+encoded using the following two-letter codes:
|
|
|
96cc1f |
+.IP
|
|
|
96cc1f |
+ rd - readable
|
|
|
96cc1f |
+ wr - writable
|
|
|
96cc1f |
+ ex - executable
|
|
|
96cc1f |
+ sh - shared
|
|
|
96cc1f |
+ mr - may read
|
|
|
96cc1f |
+ mw - may write
|
|
|
96cc1f |
+ me - may execute
|
|
|
96cc1f |
+ ms - may share
|
|
|
96cc1f |
+ gd - stack segment grows down
|
|
|
96cc1f |
+ pf - pure PFN range
|
|
|
96cc1f |
+ dw - disabled write to the mapped file
|
|
|
96cc1f |
+ lo - pages are locked in memory
|
|
|
96cc1f |
+ io - memory mapped I/O area
|
|
|
96cc1f |
+ sr - sequential read advise provided
|
|
|
96cc1f |
+ rr - random read advise provided
|
|
|
96cc1f |
+ dc - do not copy area on fork
|
|
|
96cc1f |
+ de - do not expand area on remapping
|
|
|
96cc1f |
+ ac - area is accountable
|
|
|
96cc1f |
+ nr - swap space is not reserved for the area
|
|
|
96cc1f |
+ ht - area uses huge tlb pages
|
|
|
96cc1f |
+ nl - non-linear mapping
|
|
|
96cc1f |
+ ar - architecture specific flag
|
|
|
96cc1f |
+ dd - do not include area into core dump
|
|
|
96cc1f |
+ sd - soft-dirty flag
|
|
|
96cc1f |
+ mm - mixed map area
|
|
|
96cc1f |
+ hg - huge page advise flag
|
|
|
96cc1f |
+ nh - no-huge page advise flag
|
|
|
96cc1f |
+ mg - mergeable advise flag
|
|
|
96cc1f |
+.IP
|
|
|
96cc1f |
+The
|
|
|
96cc1f |
+.IR /proc/[pid]/smaps
|
|
|
96cc1f |
+file is present only if the
|
|
|
96cc1f |
+.B CONFIG_PROC_PAGE_MONITOR
|
|
|
96cc1f |
+kernel configuration option is enabled.
|
|
|
96cc1f |
.TP
|
|
|
96cc1f |
.I /proc/[pid]/stat
|
|
|
96cc1f |
Status information about the process.
|
|
|
96cc1f |
@@ -1300,25 +1365,31 @@ Here's an example:
|
|
|
96cc1f |
|
|
|
96cc1f |
.RB "$" " cat /proc/$$/status"
|
|
|
96cc1f |
Name: bash
|
|
|
96cc1f |
+Umask: 0022
|
|
|
96cc1f |
State: S (sleeping)
|
|
|
96cc1f |
-Tgid: 3515
|
|
|
96cc1f |
-Pid: 3515
|
|
|
96cc1f |
-PPid: 3452
|
|
|
96cc1f |
+Tgid: 17248
|
|
|
96cc1f |
+Ngid: 0
|
|
|
96cc1f |
+Pid: 17248
|
|
|
96cc1f |
+PPid: 17200
|
|
|
96cc1f |
TracerPid: 0
|
|
|
96cc1f |
Uid: 1000 1000 1000 1000
|
|
|
96cc1f |
Gid: 100 100 100 100
|
|
|
96cc1f |
FDSize: 256
|
|
|
96cc1f |
Groups: 16 33 100
|
|
|
96cc1f |
-VmPeak: 9136 kB
|
|
|
96cc1f |
-VmSize: 7896 kB
|
|
|
96cc1f |
+VmPeak: 131168 kB
|
|
|
96cc1f |
+VmSize: 131168 kB
|
|
|
96cc1f |
VmLck: 0 kB
|
|
|
96cc1f |
-VmHWM: 7572 kB
|
|
|
96cc1f |
-VmRSS: 6316 kB
|
|
|
96cc1f |
-VmData: 5224 kB
|
|
|
96cc1f |
-VmStk: 88 kB
|
|
|
96cc1f |
-VmExe: 572 kB
|
|
|
96cc1f |
-VmLib: 1708 kB
|
|
|
96cc1f |
-VmPTE: 20 kB
|
|
|
96cc1f |
+VmPin: 0 kB
|
|
|
96cc1f |
+VmHWM: 13484 kB
|
|
|
96cc1f |
+VmRSS: 13484 kB
|
|
|
96cc1f |
+RssAnon: 10264 kB
|
|
|
96cc1f |
+RssFile: 3220 kB
|
|
|
96cc1f |
+RssShmem: 0 kB
|
|
|
96cc1f |
+VmData: 10332 kB
|
|
|
96cc1f |
+VmStk: 136 kB
|
|
|
96cc1f |
+VmExe: 992 kB
|
|
|
96cc1f |
+VmLib: 2104 kB
|
|
|
96cc1f |
+VmPTE: 76 kB
|
|
|
96cc1f |
Threads: 1
|
|
|
96cc1f |
SigQ: 0/3067
|
|
|
96cc1f |
SigPnd: 0000000000000000
|
|
|
96cc1f |
@@ -1330,6 +1401,9 @@ CapInh: 0000000000000000
|
|
|
96cc1f |
CapPrm: 0000000000000000
|
|
|
96cc1f |
CapEff: 0000000000000000
|
|
|
96cc1f |
CapBnd: ffffffffffffffff
|
|
|
96cc1f |
+CapAmb: 0000000000000000
|
|
|
96cc1f |
+Seccomp: 0
|
|
|
96cc1f |
+Speculation_Store_Bypass: vulnerable
|
|
|
96cc1f |
Cpus_allowed: 00000001
|
|
|
96cc1f |
Cpus_allowed_list: 0
|
|
|
96cc1f |
Mems_allowed: 1
|
|
|
96cc1f |
@@ -1345,6 +1419,11 @@ The fields are as follows:
|
|
|
96cc1f |
.IR Name :
|
|
|
96cc1f |
Command run by this process.
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
+.IR Umask :
|
|
|
96cc1f |
+Process umask, expressed in octal with a leading zero; see
|
|
|
96cc1f |
+.BR umask (2).
|
|
|
96cc1f |
+(Since Linux 4.7.)
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
.IR State :
|
|
|
96cc1f |
Current state of the process.
|
|
|
96cc1f |
One of
|
|
|
96cc1f |
@@ -1360,6 +1439,9 @@ or
|
|
|
96cc1f |
.IR Tgid :
|
|
|
96cc1f |
Thread group ID (i.e., Process ID).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
+.IR Ngid :
|
|
|
96cc1f |
+NUMA group ID (0 if none; since Linux 3.13).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
.IR Pid :
|
|
|
96cc1f |
Thread ID (see
|
|
|
96cc1f |
.BR gettid (2)).
|
|
|
96cc1f |
@@ -1371,7 +1453,7 @@ PID of parent process.
|
|
|
96cc1f |
PID of process tracing this process (0 if not being traced).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR Uid ", " Gid :
|
|
|
96cc1f |
-Real, effective, saved set, and file system UIDs (GIDs).
|
|
|
96cc1f |
+Real, effective, saved set, and filesystem UIDs (GIDs).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR FDSize :
|
|
|
96cc1f |
Number of file descriptor slots currently allocated.
|
|
|
96cc1f |
@@ -1387,13 +1469,43 @@ Virtual memory size.
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR VmLck :
|
|
|
96cc1f |
Locked memory size (see
|
|
|
96cc1f |
-.BR mlock (3)).
|
|
|
96cc1f |
+.BR mlock (2)).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR VmPin :
|
|
|
96cc1f |
+Pinned memory size
|
|
|
96cc1f |
+.\" commit bc3e53f682d93df677dbd5006a404722b3adfe18
|
|
|
96cc1f |
+(since Linux 3.2).
|
|
|
96cc1f |
+These are pages that can't be moved because something needs to
|
|
|
96cc1f |
+directly access physical memory.
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR VmHWM :
|
|
|
96cc1f |
Peak resident set size ("high water mark").
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR VmRSS :
|
|
|
96cc1f |
Resident set size.
|
|
|
96cc1f |
+Note that the value here is the sum of
|
|
|
96cc1f |
+.IR RssAnon ,
|
|
|
96cc1f |
+.IR RssFile ,
|
|
|
96cc1f |
+and
|
|
|
96cc1f |
+.IR RssShmem .
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR RssAnon :
|
|
|
96cc1f |
+Size of resident anonymous memory.
|
|
|
96cc1f |
+.\" commit bf9683d6990589390b5178dafe8fd06808869293
|
|
|
96cc1f |
+(since Linux 4.5).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR RssFile :
|
|
|
96cc1f |
+Size of resident file mappings.
|
|
|
96cc1f |
+.\" commit bf9683d6990589390b5178dafe8fd06808869293
|
|
|
96cc1f |
+(since Linux 4.5).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR RssShmem :
|
|
|
96cc1f |
+Size of resident shared memory (includes System V shared memory,
|
|
|
96cc1f |
+mappings from
|
|
|
96cc1f |
+.BR tmpfs (5),
|
|
|
96cc1f |
+and shared anonymous mappings).
|
|
|
96cc1f |
+.\" commit bf9683d6990589390b5178dafe8fd06808869293
|
|
|
96cc1f |
+(since Linux 4.5).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR VmData ", " VmStk ", " VmExe :
|
|
|
96cc1f |
Size of data, stack, and text segments.
|
|
|
96cc1f |
@@ -1435,9 +1547,35 @@ Masks of capabilities enabled in inheritable, permitted, and effective sets
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
.IR CapBnd :
|
|
|
96cc1f |
Capability Bounding set
|
|
|
96cc1f |
-(since kernel 2.6.26, see
|
|
|
96cc1f |
+(since Linux 2.6.26, see
|
|
|
96cc1f |
+.BR capabilities (7)).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR CapAmb :
|
|
|
96cc1f |
+Ambient capability set
|
|
|
96cc1f |
+(since Linux 4.3, see
|
|
|
96cc1f |
.BR capabilities (7)).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
+.IR Seccomp :
|
|
|
96cc1f |
+.\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816
|
|
|
96cc1f |
+Seccomp mode of the process
|
|
|
96cc1f |
+(since Linux 3.8, see
|
|
|
96cc1f |
+.BR seccomp (2)).
|
|
|
96cc1f |
+0 means
|
|
|
96cc1f |
+.BR SECCOMP_MODE_DISABLED ;
|
|
|
96cc1f |
+1 means
|
|
|
96cc1f |
+.BR SECCOMP_MODE_STRICT ;
|
|
|
96cc1f |
+2 means
|
|
|
96cc1f |
+.BR SECCOMP_MODE_FILTER .
|
|
|
96cc1f |
+This field is provided only if the kernel was built with the
|
|
|
96cc1f |
+.BR CONFIG_SECCOMP
|
|
|
96cc1f |
+kernel configuration option enabled.
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
+.IR Speculation_Store_Bypass :
|
|
|
96cc1f |
+.\" commit fae1fa0fc6cca8beee3ab8ed71d54f9a78fa3f64
|
|
|
96cc1f |
+Speculation flaw mitigation state
|
|
|
96cc1f |
+(since Linux 4.17, see
|
|
|
96cc1f |
+.BR prctl (2)).
|
|
|
96cc1f |
+.IP *
|
|
|
96cc1f |
.IR Cpus_allowed :
|
|
|
96cc1f |
Mask of CPUs on which this process may run
|
|
|
96cc1f |
(since Linux 2.6.24, see
|
|
|
96cc1f |
@@ -1458,7 +1596,7 @@ Same as previous, but in "list format"
|
|
|
96cc1f |
(since Linux 2.6.26, see
|
|
|
96cc1f |
.BR cpuset (7)).
|
|
|
96cc1f |
.IP *
|
|
|
96cc1f |
-.IR voluntary_context_switches ", " nonvoluntary_context_switches :
|
|
|
96cc1f |
+.IR voluntary_ctxt_switches ", " nonvoluntary_ctxt_switches :
|
|
|
96cc1f |
Number of voluntary and involuntary context switches (since Linux 2.6.23).
|
|
|
96cc1f |
.RE
|
|
|
96cc1f |
.TP
|
|
|
96cc1f |
--
|
|
|
96cc1f |
2.17.1
|
|
|
96cc1f |
|