Lunix Core Files

To enable core file generation..

Configure core files to use the PID as a extension.   Set “kernel.core_uses_pid = 1” in /etc/sysctl.conf  and run “/sbin/sysctl -p /etc/sysctl.conf: or to add it temporarily run “/sbin/sysctl -w kernel.core_uses_pid=1” to change the running kernel.   Without kernel.core_uses_pid = 1 the core file will  be over written each time it is dumps.

Make sure the process has unlimited core dump size with “ulimit -c unlimited” or to turn off core dump “ulimit -c 0”

When a process started by that shell receives a seg fault or other faults it will write a core file to the working directory of the process before it exits.

Handy tools for extracting information from core files:

  • Information on dore:  core <>
  • JVM Heap dump: jmap -dump:format=b,file=dump.hprof /usr/bin/java <>
  • JVM Thread dump: jstack /usr/bin/java <> > dump.threads


Leave a Reply

Your email address will not be published. Required fields are marked *