LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Core Dump Not Working? (https://www.linuxquestions.org/questions/linux-server-73/core-dump-not-working-868567/)

neocontrol 03-14-2011 04:28 PM

Core Dump Not Working?
 
Hi,

I'm trying to get a thread dump / core dump (I think they are the same thing) on a particular Java application.

I've looked at this guide in particular - http://java.sun.com/developer/techni...ng/Stacktrace/

In my /etc/sysctl.conf I have a line like this:

kernel.core_uses_pid = 1

I suspect I should have something in /tmp/ named core.<pid> after running 'kill -3 <pid>' or 'kill -s QUIT <pid>'. I have checked my home directories, root home directory, /tmp, and /var/tmp all with nothing that resembles what I'm looking for.

I'm running Cent OS 5.5 x86_64. The application itself is a mapreduce client on hadoop.

Can someone take me to the school of doing application core dumps? I was thinking of doing a strace on the application but usually we don't start seeing errors for a couple hours, which I suspect will make the log file huge to dig through.

Thanks in advance!

timetraveler 03-14-2011 06:33 PM

kill -11 PID.

Also check ulimit to see what your core file size is set to.

/proc/sys/kernel/core_pattern

core_pattern is used to specify a core dumpfile pattern name.
. max length 128 characters; default value is "core"
. core_pattern is used as a pattern template for the output filename;
certain string patterns (beginning with '%') are substituted with
their actual values.
. backward compatibility with core_uses_pid:
If core_pattern does not include "%p" (default does not)
and core_uses_pid is set, then .PID will be appended to
the filename.
. corename format specifiers:
%<NUL> '%' is dropped
%% output one '%'
%p pid
%u uid
%g gid
%s signal number
%t UNIX time of dump
%h hostname
%e executable filename
%<OTHER> both are dropped
. If the first character of the pattern is a '|', the kernel will treat
the rest of the pattern as a command to run. The core dump will be
written to the standard input of that program instead of to a file.


All times are GMT -5. The time now is 02:10 AM.