如何在每个进程的核心转储在Linux?

如何使Linux 核心转储不仅仅针对deaemons的每个进程?

谢谢!

守护进程和正常程序在核心倾销行为中没有区别。 您只需要更改核心限制: ulimit -c unlimited确保使用ulimit -c设置为无限制。 要检查您是否有权更改核心限制,请运行: ulimit -Hc

要保持用户的核心转储configuration,请更改/etc/security/limits.conf或添加到用户的.bash_profile中: ulimit -c unlimited

/etc/security/limits.conf允许你改变所有用户的限制。 当用户login使用pam(login,ssh,pop3等)的服务时,该文件被pam库读取。 该文件的格式logging在man -S5 limits.conf

 # Users that are members of coredump group have the core dump limit removed. @coredump soft core unlimited # user joe can dump a core of maximum 100MB #joe soft core 102400 

SIGQUIT的默认操作是生成核心映像。 这样就kill -3的利益过程。