summaryrefslogtreecommitdiffstats
path: root/man5/proc_pid_smaps.5
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man5/proc_pid_smaps.5
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man5/proc_pid_smaps.5')
-rw-r--r--man5/proc_pid_smaps.5129
1 files changed, 129 insertions, 0 deletions
diff --git a/man5/proc_pid_smaps.5 b/man5/proc_pid_smaps.5
new file mode 100644
index 0000000..21d7d5c
--- /dev/null
+++ b/man5/proc_pid_smaps.5
@@ -0,0 +1,129 @@
+'\" t
+.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
+.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
+.\"
+.\" SPDX-License-Identifier: GPL-3.0-or-later
+.\"
+.TH proc_pid_smaps 5 2023-09-07 "Linux man-pages 6.7"
+.SH NAME
+/proc/pid/smaps \- XXX: What does 's' in "smaps" stand for?
+.SH DESCRIPTION
+.TP
+.IR /proc/ pid /smaps " (since Linux 2.6.14)"
+This file shows memory consumption for each of the process's mappings.
+(The
+.BR pmap (1)
+command displays similar information,
+in a form that may be easier for parsing.)
+For each mapping there is a series of lines such as the following:
+.IP
+.in +4n
+.EX
+00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
+Size: 552 kB
+Rss: 460 kB
+Pss: 100 kB
+Shared_Clean: 452 kB
+Shared_Dirty: 0 kB
+Private_Clean: 8 kB
+Private_Dirty: 0 kB
+Referenced: 460 kB
+Anonymous: 0 kB
+AnonHugePages: 0 kB
+ShmemHugePages: 0 kB
+ShmemPmdMapped: 0 kB
+Swap: 0 kB
+KernelPageSize: 4 kB
+MMUPageSize: 4 kB
+Locked: 0 kB
+ProtectionKey: 0
+VmFlags: rd ex mr mw me dw
+.EE
+.in
+.IP
+The first of these lines shows the same information as is displayed
+for the mapping in
+.IR /proc/ pid /maps .
+The following lines show the size of the mapping,
+the amount of the mapping that is currently resident in RAM ("Rss"),
+the process's proportional share of this mapping ("Pss"),
+the number of clean and dirty shared pages in the mapping,
+and the number of clean and dirty private pages in the mapping.
+"Referenced" indicates the amount of memory currently marked as
+referenced or accessed.
+"Anonymous" shows the amount of memory
+that does not belong to any file.
+"Swap" shows how much
+would-be-anonymous memory is also used, but out on swap.
+.IP
+The "KernelPageSize" line (available since Linux 2.6.29)
+is the page size used by the kernel to back the virtual memory area.
+This matches the size used by the MMU in the majority of cases.
+However, one counter-example occurs on PPC64 kernels
+whereby a kernel using 64 kB as a base page size may still use 4 kB
+pages for the MMU on older processors.
+To distinguish the two attributes, the "MMUPageSize" line
+(also available since Linux 2.6.29)
+reports the page size used by the MMU.
+.IP
+The "Locked" indicates whether the mapping is locked in memory
+or not.
+.IP
+The "ProtectionKey" line (available since Linux 4.9, on x86 only)
+contains the memory protection key (see
+.BR pkeys (7))
+associated with the virtual memory area.
+This entry is present only if the kernel was built with the
+.B CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
+configuration option (since Linux 4.6).
+.IP
+The "VmFlags" line (available since Linux 3.8)
+represents the kernel flags associated with the virtual memory area,
+encoded using the following two-letter codes:
+.RS
+.IP
+.TS
+l l l.
+rd - readable
+wr - writable
+ex - executable
+sh - shared
+mr - may read
+mw - may write
+me - may execute
+ms - may share
+gd - stack segment grows down
+pf - pure PFN range
+dw - disabled write to the mapped file
+lo - pages are locked in memory
+io - memory mapped I/O area
+sr - sequential read advise provided
+rr - random read advise provided
+dc - do not copy area on fork
+de - do not expand area on remapping
+ac - area is accountable
+nr - swap space is not reserved for the area
+ht - area uses huge tlb pages
+sf - perform synchronous page faults (since Linux 4.15)
+nl - non-linear mapping (removed in Linux 4.0)
+ar - architecture specific flag
+wf - wipe on fork (since Linux 4.14)
+dd - do not include area into core dump
+sd - soft-dirty flag (since Linux 3.13)
+mm - mixed map area
+hg - huge page advise flag
+nh - no-huge page advise flag
+mg - mergeable advise flag
+um - userfaultfd missing pages tracking (since Linux 4.3)
+uw - userfaultfd wprotect pages tracking (since Linux 4.3)
+.TE
+.RE
+.IP
+The
+.IR /proc/ pid /smaps
+file is present only if the
+.B CONFIG_PROC_PAGE_MONITOR
+kernel configuration option is enabled.
+.SH SEE ALSO
+.BR proc (5)