|%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.|
The name defaults to
yielding the traditional
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:
When COMPRESS_USER_CORES is included the following sysctls can control if core files will be compressed:
|Gzip compression level. Defaults to -1.|
|kern.compress_user_cores||Actually compress user cores. Core files will have the suffix .gz appended to them.|
Corefiles are written with open file descriptor information as an ELF note. By default, file paths are packed to only use as much space as needed. However, file paths can change at any time, including during core dump, and this can result in truncated file descriptor data.
All file descriptor information can be preserved by disabling packing. This potentially wastes up to PATH_MAX bytes per open fd. Packing is disabled with
Similarly, corefiles are written with vmmap information as an ELF note, which contains file paths. By default, they are packed to only use as much space as needed. By the same mechanism as for the open files note, these paths can also change at any time and result in a truncated note.
All vmmap information can be preserved by disabling packing. Like the file information, this potentially wastes up to PATH_MAX bytes per mapped object. Packing is disabled with
In order to store all core images in per-user private areas under /var/coredumps, the following sysctl(8) command can be used:
A core file format appeared in AT&T v6 .