linux core 名字格式,linux下core文件名字的配置方法

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值