Turns out this can be a 2 step process and so far I don't understand when the 
second step is needed but we needed it.
First set 'ulimit -c unlimited' or /etc/security/limits to "soft core 
unlimited" like has been advised. This will get cores for some process such as 
a new SSH session but not for most process.

Second you need something like:
        DAEMON_COREFILE_LIMIT=unlimited
        export DAEMON_COREFILE_LIMIT
this will set the core size to unlimited for all new process. In 
/etc/init.d/functions there is this line that is the reason this is needed:

corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}"

To survive a reboot, you can add DAEMON_COREFILE_LIMIT='unlimited' to 
/etc/sysconfig/init for global changes or for the specific daemon to 
/etc/init.d/ or /etc/sysconfig/daemons.
 
And in case you don't know (I didn't) you can control the location and names of 
the cores files in /etc/syscyl.conf with something like 'kernel.core_pattern = 
/tmp/core-%p' where %p is the PID number.

I imagine there are others methods to accomplish this but this is what we had 
to do. You mileage may vary.

Bobby Bauer
Center for Information Technology
National Institutes of Health
Bethesda, MD 20892-5628
301-594-7474


-----Original Message-----
From: Brad Hinson [mailto:[email protected]] 
Sent: Tuesday, August 30, 2011 2:32 PM
To: [email protected]
Subject: Re: Enabling core dumps for RHEL 6

On Aug 25, 2011, at 11:33 PM, Mark Post wrote:

>>>> On 8/25/2011 at 01:10 PM, "Bauer, Bobby (NIH/CIT) [E]" 
>>>> <[email protected]>
> wrote: 
>> Anybody know how to enable core dumps for RHEL 6. Working with a vendor who 
>> has asked for a dump but we can't seem to get one. Haven't found anything in 
>> the manuals yet.
> 
> Did you read the "Using the Dump Tools on Red Hat Enterprise Linux 6.1 - 
> SC34-2607-01" manual on IBM's developerWorks page?
> 
> 
> Mark Post

If it's an application crash, run 'ulimit -c' to check that core dumps are 
enabled for processes.  'ulimit -c unlimited' sets this on the fly (won't 
survive a reboot), or you can set it permanently in /etc/security/limits.conf 
(better approach).

> 
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to