Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|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
up vote 1 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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