I am trying to find out the reason of crash for one of my Linux application. But I don't know where core is going.
cat /proc/sys/kernel/core_pattern core.%e.%p
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Systems using systemd are usually configured to dump cores to
You may use the
coredumpctl command to list core dumps.
See also no-more-coredumps-after-migrating-to-systemd
The core dump is written in the current directory of the process at the time of the crash.
Of course core dumps need to be enabled, by default those are usually disabled. Check the output of
ulimit -c, if that's 0 then no core file will be written. Run
ulimit -c unlimited to enable core dumps; this is a per-process setting which is inherited by processes started by that process.
If a core dump should have been generated but you don't know where, then you could start the process again (if it will without crashing immediately), then check its working directory by doing
ls -l /proc/$pid/cwd where
$pid is the process ID of the process. That link will point to the current working directory of that process. Chances are the core dump will be there. Otherwise you need to run
find on the entire system...