1 .\" Copyright (c) 1980, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)core.5 8.3 (Berkeley) 12/11/93
36 .Nd memory image file format
40 A small number of signals which cause abnormal termination of a process
41 also cause a record of the process's in-core state to be written
42 to disk for later examination by one of the available debuggers.
45 This memory image is written to a file named by default
47 in the working directory;
48 provided the terminated process had write permission in the directory,
49 and provided the abnormality did not cause
51 (In this event, the decision to save the core file is arbitrary, see
54 The maximum size of a core file is limited by
56 Files which would be larger than the limit are not created.
58 The name of the file is controlled via the
62 The contents of this variable describes a filename to store
64 This filename can be absolute, or relative (which
65 will resolve to the current working directory of the program
68 The following format specifiers may be used in the
70 sysctl to insert additional information into the resulting core file
72 .Bl -tag -width "1234567890" -compact -offset "12345"
76 An index starting at zero until the sysctl
79 This can be useful for limiting the number of corefiles
80 generated by a particular process.
91 yielding the traditional
95 By default, a process that changes user or group credentials whether
96 real or effective will not create a corefile.
98 changed to generate a core dump by setting the
101 .Va kern.sugid_coredump
104 Corefiles can be compressed by the kernel if the following items
105 are included in the kernel configuration file:
106 .Bl -tag -width "1234567890" -compact -offset "12345"
113 When COMPRESS_USER_CORES is included the following sysctls can control
114 if core files will be compressed:
115 .Bl -tag -width "kern.compress_user_cores_gzlevel" -compact -offset "12345"
116 .It Em kern.compress_user_cores_gzlevel
117 Gzip compression level.
119 .It Em kern.compress_user_cores
120 Actually compress user cores.
121 Core files will have the suffix
126 In order to store all core images in per-user private areas under
132 .Dl sysctl kern.corefile=/var/coredumps/\&%U/\&%N.core
142 file format appeared in