Core Dump and Stack Tace on Linux of a Java process

Steps for taking the Core Dump
Run the command
# ps -ef | grep java

get the process id of the java process you want to get the core dump.

Next run the command
# gdb --pid=
Next
gdb>gcore
This should create a file core. in the /var/tmp location

Remember its a binary file.

If I find some other better way to take the dump, I would update.
If you know other ways please let me know.

Steps fr taking the stack Trace
jstack [-l] pid (simple)

Difference between core dump and Stack Trace

Core dump prints the complete memory map of a process and stack trace prints the state of threads of a processs.

Comments

Popular posts from this blog

Hibernate: a different object with the same identifier value was already associated with the session

BeanDefinitionStoreException: Failed to parse configuration class: Could not find class [javax.jms.ConnectionFactory]