Allowing core files of unlimited size in Linux


To allow core files of any size:

1) Check limits.conf

############################################
#/etc/security/limits.conf
#
#<user> soft core unlimited
#<user> hard core unlimited
# How to set unlimited for all users
* soft core unlimited
* hard core unlimited
################# End of File ###############

2)Check /etc/profile, make sure the following line “ulimit -Sc 0” is commented

# No core files by default
# ulimit -S -c 0 > /dev/null 2>&1

3)Check /etc/init.d/functions, make sure the following line “ulimit -Sc 0” is commented

# make sure it doesn't core dump anywhere unless requested
# ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1

4) How to set unlimited core dump for the current logon session (as root)

# ulimit -Sc unlimited
# ulimit -Hc unlimited

5) Validate settings

# ulimit -a

Leave a comment