Finding core-dump file

Robin Dong 2018-08-31 11:42

In a new server, my program got ‘core dump’. But I haven’t found the core-dump file in the current directory as usual.
First I checked the ‘ulimit’ configuration:

core file size          (blocks, -c) unlimited

Seems ok. The system will generate core-dump file when the program crashed. But where is it?
Eventually, I found out theanswer: core-dump file will be generated by following pattern written in /proc/sys/kernel/core_pattern.

cat /proc/sys/kernel/core_pattern
/var/coredump/core-%u-%e-%p-%t

Therefore all the core-dump files sited in /var/coredump/ directory. The pattern setting of ‘core_pattern’ file is explainedhere.

[返回] [原文链接]