I've been going through intense program/package installation recently, so I can't tell for sure which of the newly installed programs (or old programs) caused the appearance of a core file in my home folder. It's a server, so I better find out any possible sources of instability on the machine.


Ok, it turned out there was a more straightforward way of identifying a misbehaved program using the file utility:

$ file core
core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'sqlplus'

So sqlplus in the example above would be the main suspect.

| improve this answer | |

One way is to set the name of the core dump file to contain the PID and name of the process that caused the core dump using:

echo "core-%p-%e" | sudo tee /proc/sys/kernel/core_pattern

here is an example of it working:

Segmentation fault (core dumped)
ls core*

See man 5 core for more details of how to use the core_pattern interface.

| improve this answer | |
  • The filename format doesn't seem to to stick from one boot to another. – Desmond Hume Nov 9 '12 at 13:33
  • Indeed, it is a run time kernel setting. One needs to set it on each reboot. You could add the command to /etc/rc.local for example, and since this is run with root privilege you just need to add the following line in /etc/rc.local: echo "core-%p-%e" > /proc/sys/kernel/core_pattern – Colin Ian King Nov 9 '12 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.