Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to enable core files on a machine running CentOS 6; however, nothing I have tried has produced core files…here is what I have done:

Added the following two lines to /etc/security/limits.conf:

*     hard    core    unlimited
*     soft    core    unlimited

Added the following line to /etc/sysconfig/init:


Added the following line to /etc/profile:

ulimit -c unlimited > /dev/null 2>&1

Added the following lines to /etc/sysctl.conf:

kernel.core_pattern = '/srv/core/%p_%t.core'
fs.suid_dumpable = 1

I made sure that /srv/core exists and has 777 permissions. The I executed init 6 to reboot the OS. Upon the system coming back up, I executed the following C script in an attempt to produce a core file:

#include <sys/types.h>
#include <unistd.h>
#include <signal.h>

int main(int argc, char **argv) {
  kill(getpid(), SIGQUIT);

It does not produce a core file :(

What am I missing or doing wrong? Thanks in advance for your help!

share|improve this question
Is the missing ' at the end of the line for /etc/sysconfig/init a bad copy/paste or is it really missing? –  yoonix May 2 at 20:47
Just a copy/paste error…fixed that in the question –  Kabb5 May 3 at 0:56
I'd change your file mode from 777 to 1777 to prevent 'accidental' deletion of one users core files by another... –  user1174838 May 3 at 11:41
can you show ulimit -a ? –  c4f4t0r May 4 at 23:05

Your Answer


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

Browse other questions tagged or ask your own question.