Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

core(5) [freebsd man page]

CORE(5) 						      BSD File Formats Manual							   CORE(5)

NAME
core -- memory image file format SYNOPSIS
#include <sys/param.h> DESCRIPTION
A small number of signals which cause abnormal termination of a process also cause a record of the process's in-core state to be written to disk for later examination by one of the available debuggers. (See sigaction(2).) This memory image is written to a file named by default programname.core in the working directory; provided the terminated process had write permission in the directory, and provided the abnormal- ity did not cause a system crash. (In this event, the decision to save the core file is arbitrary, see savecore(8).) The maximum size of a core file is limited by setrlimit(2). Files which would be larger than the limit are not created. The name of the file is controlled via the sysctl(8) variable kern.corefile. The contents of this variable describes a filename to store the core image to. This filename can be absolute, or relative (which will resolve to the current working directory of the program generating it). The following format specifiers may be used in the kern.corefile sysctl to insert additional information into the resulting core file name: %H Machine hostname. %I An index starting at zero until the sysctl debug.ncores is reached. This can be useful for limiting the number of corefiles generated by a particular process. %N process name. %P processes PID. %U process UID. The name defaults to %N.core, yielding the traditional FreeBSD behaviour. By default, a process that changes user or group credentials whether real or effective will not create a corefile. This behaviour can be changed to generate a core dump by setting the sysctl(8) variable kern.sugid_coredump to 1. Corefiles can be compressed by the kernel if the following items are included in the kernel configuration file: options COMPRESS_USER_CORES devices gzio When COMPRESS_USER_CORES is included the following sysctls can control if core files will be compressed: kern.compress_user_cores_gzlevel Gzip compression level. Defaults to -1. kern.compress_user_cores Actually compress user cores. Core files will have the suffix .gz appended to them. EXAMPLES
In order to store all core images in per-user private areas under /var/coredumps, the following sysctl(8) command can be used: sysctl kern.corefile=/var/coredumps/%U/%N.core SEE ALSO
gdb(1), kgdb(1), setrlimit(2), sigaction(2), sysctl(8) HISTORY
A core file format appeared in Version 6 AT&T UNIX. BSD
November 22, 2012 BSD

Check Out this Related Man Page

gcore(1)                                                           User Commands                                                          gcore(1)

NAME
gcore - get core images of running processes SYNOPSIS
gcore [-pgF] [-o filename] [-c content] process-id... DESCRIPTION
The gcore utility creates a core image of each specified process. By default, the name of the core image file for the process whose process ID is process-id will be core.process-id. OPTIONS
The following options are supported: -c content Produces core image files with the specified content. The content description uses the same tokens as in coreadm(1M). The -c option does not apply to cores produced due to the -p or -g flags. -F Force. Grabs the target process even if another process has control. -g Produces core image files in the global core file repository with the global content as configured by coreadm(1M). The com- mand will fail if the user does not have permissions to the global core file repository. -o filename Substitutes filename in place of core as the first part of the name of the core image files. filename can contain the same tokens to be expanded as the paths in coreadm(1M). -p Produces a core image file in the process-specific location with the process-specific content for each process as config- ured by coreadm(1M). The command will fail if the user does not have permissions to the per-process core file repository. OPERANDS
The following operand is supported: process-id process ID EXIT STATUS
The following exit values are returned: 0 On success. non-zero On failure, such as non-existent process ID. FILES
core.process-id core images ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtoo | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Command Syntax is Evolving. Output Format(s) are Unstable. SEE ALSO
kill(1), coreadm(1M), setrlimit(2), core(4), proc(4), attributes(5) NOTES
gcore is unaffected by the setrlimit(2) system call using the RLIMIT_CORE value. SunOS 5.10 11 Feb 2004 gcore(1)
Man Page