aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKawai, Hidehiro <hidehiro.kawai.ez@hitachi.com>2007-07-19 04:48:31 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:47 -0400
commitbb90110dcb9e93bf79e3c988abc6cbcabd46d57f (patch)
tree0c082570bea12431636bd44fe470ebc0c9a6d8ab /Documentation
parentee78b0a61f0514ffc3d59257fbe6863b43477829 (diff)
coredump masking: documentation for /proc/pid/coredump_filter
This patch adds the documentation for /proc/<pid>/coredump_filter. Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/filesystems/proc.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 72e247ef6fa2..4a37e25e694c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -42,6 +42,7 @@ Table of Contents
42 2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score 42 2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
43 2.13 /proc/<pid>/oom_score - Display current oom-killer score 43 2.13 /proc/<pid>/oom_score - Display current oom-killer score
44 2.14 /proc/<pid>/io - Display the IO accounting fields 44 2.14 /proc/<pid>/io - Display the IO accounting fields
45 2.15 /proc/<pid>/coredump_filter - Core dump filtering settings
45 46
46------------------------------------------------------------------------------ 47------------------------------------------------------------------------------
47Preface 48Preface
@@ -2184,4 +2185,41 @@ those 64-bit counters, process A could see an intermediate result.
2184More information about this can be found within the taskstats documentation in 2185More information about this can be found within the taskstats documentation in
2185Documentation/accounting. 2186Documentation/accounting.
2186 2187
21882.15 /proc/<pid>/coredump_filter - Core dump filtering settings
2189---------------------------------------------------------------
2190When a process is dumped, all anonymous memory is written to a core file as
2191long as the size of the core file isn't limited. But sometimes we don't want
2192to dump some memory segments, for example, huge shared memory. Conversely,
2193sometimes we want to save file-backed memory segments into a core file, not
2194only the individual files.
2195
2196/proc/<pid>/coredump_filter allows you to customize which memory segments
2197will be dumped when the <pid> process is dumped. coredump_filter is a bitmask
2198of memory types. If a bit of the bitmask is set, memory segments of the
2199corresponding memory type are dumped, otherwise they are not dumped.
2200
2201The following 4 memory types are supported:
2202 - (bit 0) anonymous private memory
2203 - (bit 1) anonymous shared memory
2204 - (bit 2) file-backed private memory
2205 - (bit 3) file-backed shared memory
2206
2207 Note that MMIO pages such as frame buffer are never dumped and vDSO pages
2208 are always dumped regardless of the bitmask status.
2209
2210Default value of coredump_filter is 0x3; this means all anonymous memory
2211segments are dumped.
2212
2213If you don't want to dump all shared memory segments attached to pid 1234,
2214write 1 to the process's proc file.
2215
2216 $ echo 0x1 > /proc/1234/coredump_filter
2217
2218When a new process is created, the process inherits the bitmask status from its
2219parent. It is useful to set up coredump_filter before the program runs.
2220For example:
2221
2222 $ echo 0x7 > /proc/self/coredump_filter
2223 $ ./some_program
2224
2187------------------------------------------------------------------------------ 2225------------------------------------------------------------------------------