Naming of core dump files
By default, a core dump file is named core, but the /proc/sys/ker-
nel/core_pattern file (new in Linux 2.5) can be set to define a tem-
plate that is used to name core dump files. The template can contain %
specifiers which are substituted by the following values when a core
file is created:
%% A single % character
%p PID of dumped process
%u real UID of dumped process
%g real GID of dumped process
%s number of signal causing dump
%t time of dump (seconds since 0:00h, 1 Jan 1970)
%h hostname (same as 'nodename' returned by uname(2))
%e executable filename
A single % at the end of the template is dropped from the core file-
name, as is the combination of a % followed by any character other than
those listed above. All other characters in the template become a lit-
eral part of the core filename. The template may include `/' charac-
ters, which are interpreted as delimiters for directory names. The
maximum size of the resulting core filename is 64 bytes. The default
value in this file is "core". For backward compatibility, if
/proc/sys/kernel/core_pattern does not include "%p" and /proc/sys/ker-
nel/core_uses_pid (see below) is non-zero, then .PID will be appended
to the core filename.
Linux 2.4 does not provide /proc/sys/kernel/core_pattern, but does pro-
vide a more primitive method of controlling the name of the core dump
file. If the /proc/sys/kernel/core_uses_pid file contains the value 0,
then a core dump file is simply named core. If this file contains a
non-zero value, then the core dump file includes the process ID in a
name of the form core.PID.
阅读(2256) | 评论(0) | 转发(0) |