]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man5/proc_pid_smaps.5
tzfile.5, tzselect.8, zdump.8, zic.8: Refresh pages
[thirdparty/man-pages.git] / man5 / proc_pid_smaps.5
CommitLineData
5d6be8b1 1'\" t
68a405e7
AC
2.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
3.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
4.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
5.\"
6.\" SPDX-License-Identifier: GPL-3.0-or-later
7.\"
8.TH proc_pid_smaps 5 (date) "Linux man-pages (unreleased)"
9.SH NAME
10/proc/pid/smaps \- XXX: What does 's' in "smaps" stand for?
11.SH DESCRIPTION
12.TP
13.IR /proc/ pid /smaps " (since Linux 2.6.14)"
14This file shows memory consumption for each of the process's mappings.
15(The
16.BR pmap (1)
17command displays similar information,
18in a form that may be easier for parsing.)
19For each mapping there is a series of lines such as the following:
20.IP
21.in +4n
22.EX
2300400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
24Size: 552 kB
25Rss: 460 kB
26Pss: 100 kB
27Shared_Clean: 452 kB
28Shared_Dirty: 0 kB
29Private_Clean: 8 kB
30Private_Dirty: 0 kB
31Referenced: 460 kB
32Anonymous: 0 kB
33AnonHugePages: 0 kB
34ShmemHugePages: 0 kB
35ShmemPmdMapped: 0 kB
36Swap: 0 kB
37KernelPageSize: 4 kB
38MMUPageSize: 4 kB
39Locked: 0 kB
40ProtectionKey: 0
41VmFlags: rd ex mr mw me dw
42.EE
43.in
44.IP
45The first of these lines shows the same information as is displayed
46for the mapping in
47.IR /proc/ pid /maps .
48The following lines show the size of the mapping,
49the amount of the mapping that is currently resident in RAM ("Rss"),
50the process's proportional share of this mapping ("Pss"),
51the number of clean and dirty shared pages in the mapping,
52and the number of clean and dirty private pages in the mapping.
53"Referenced" indicates the amount of memory currently marked as
54referenced or accessed.
55"Anonymous" shows the amount of memory
56that does not belong to any file.
57"Swap" shows how much
58would-be-anonymous memory is also used, but out on swap.
59.IP
60The "KernelPageSize" line (available since Linux 2.6.29)
61is the page size used by the kernel to back the virtual memory area.
62This matches the size used by the MMU in the majority of cases.
63However, one counter-example occurs on PPC64 kernels
64whereby a kernel using 64 kB as a base page size may still use 4 kB
65pages for the MMU on older processors.
66To distinguish the two attributes, the "MMUPageSize" line
67(also available since Linux 2.6.29)
68reports the page size used by the MMU.
69.IP
70The "Locked" indicates whether the mapping is locked in memory
71or not.
72.IP
73The "ProtectionKey" line (available since Linux 4.9, on x86 only)
74contains the memory protection key (see
75.BR pkeys (7))
76associated with the virtual memory area.
77This entry is present only if the kernel was built with the
78.B CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
79configuration option (since Linux 4.6).
80.IP
81The "VmFlags" line (available since Linux 3.8)
82represents the kernel flags associated with the virtual memory area,
83encoded using the following two-letter codes:
84.RS
85.IP
86.TS
87l l l.
88rd - readable
89wr - writable
90ex - executable
91sh - shared
92mr - may read
93mw - may write
94me - may execute
95ms - may share
96gd - stack segment grows down
97pf - pure PFN range
98dw - disabled write to the mapped file
99lo - pages are locked in memory
100io - memory mapped I/O area
101sr - sequential read advise provided
102rr - random read advise provided
103dc - do not copy area on fork
104de - do not expand area on remapping
105ac - area is accountable
106nr - swap space is not reserved for the area
107ht - area uses huge tlb pages
108sf - perform synchronous page faults (since Linux 4.15)
109nl - non-linear mapping (removed in Linux 4.0)
110ar - architecture specific flag
111wf - wipe on fork (since Linux 4.14)
112dd - do not include area into core dump
113sd - soft-dirty flag (since Linux 3.13)
114mm - mixed map area
115hg - huge page advise flag
116nh - no-huge page advise flag
117mg - mergeable advise flag
118um - userfaultfd missing pages tracking (since Linux 4.3)
119uw - userfaultfd wprotect pages tracking (since Linux 4.3)
120.TE
121.RE
122.IP
123The
124.IR /proc/ pid /smaps
125file is present only if the
126.B CONFIG_PROC_PAGE_MONITOR
127kernel configuration option is enabled.
128.SH SEE ALSO
129.BR proc (5)