Generate coredumps automatically in specified directory

If you are into investigating coredumps, or you are just curious about how many processes have coredumped, then this is for you:

1. add the following line to /etc/security/limits.conf
* - core unlimited
2. add the following line to /etc/sysctl.conf
kernel.core_pattern = /corefiles/core.%e.%p
%e is the executable filename, %p is pid.
Please check the "Naming of core dump files" section of man 5 core for more information on this.

3. run "sysctl -p", then logout and login. Or just reboot.

This is what I have on my Yeeloong:
$ ls /corefiles/
core.genstrings.11832 core.nscd.10278 core.nscd.12821 core.nscd.13617 core.nscd.23172 core.nscd.29367 core.nscd.6428
core.genstrings.18210 core.nscd.10281 core.nscd.13061 core.nscd.13620 core.nscd.23175 core.nscd.29368 core.nscd.6431
core.main.19478 core.nscd.10284 core.nscd.13064 core.nscd.19028 core.nscd.24042 core.nscd.29369
core.main.19702 core.nscd.10293 core.nscd.13067 core.nscd.19031 core.nscd.29353 core.nscd.29371
core.main.19825 core.nscd.10294 core.nscd.13219 core.nscd.22710 core.nscd.29360 core.nscd.29372
core.main.19894 core.nscd.12815 core.nscd.13222 core.nscd.22713 core.nscd.29363 core.nscd.29373
core.mkhomedir_helpe.31721 core.nscd.12818 core.nscd.13614 core.nscd.22716 core.nscd.29366 core.nscd.6425

Comments

Anonymous said…
Just for your info:

I see those nscd cores on x86_64 as well, so it's not MIPS related.
r0bertz said…
Yes, it is not MIPS specific.

Popular posts from this blog

portage-2.2 preserve-libs FEATURES explained

Send $SGB (Songbird) to another wallet using a script

The diff between the original SEC complaint against Ripple and the amended one