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