Ubuntu 10.04 – Enable core dumps
By default, core dumps are disabled in Ubuntu. To enable core dumps, for the current user, and for the root user:
- gedit /etc/security/limits.conf
- Enable the lines:
* soft core 2000000
root soft core 2000000 - Reboot.
- Use the command ulimits -c to verify that the maximum core dump size has been adjusted.
(Optional) For security reasons, Ubuntu separately enables core dumps for setuid applications:
- gedit /etc/sysctl.conf
- Add the line:
fs.suid_dumpable = 1 - sysctl -p
(Optional) To re-direct and rename core files use a core pattern:
- gedit /etc/sysctl.conf
- Add the lines:
kernel.core_pattern = /var/crash/core.%e.%u.%t
kernel.core_uses_pid = 1 - sysctl -p
References:
- https://bugs.launchpad.net/ubuntu/+source/pam/+bug/65244
- Man page for limits.conf: http://linux.die.net/man/5/limits.conf
- Man page for suid_dumpable: http://man.he.net/man5/proc
- Man page for kernel.core_pattern: https://www.kernel.org/doc/man-pages/online/pages/man5/core.5.html
- http://serverfault.com/questions/173981/no-coredumps-for-daemons-started-at-boot-by-init-d-on-ubuntu
- https://wiki.ubuntu.com/Apport
Advertisement
Categories: Linux, System Admin