The Java heap is the memory space where the Java Virtual Machine (JVM) stores the entire set of objects created by the running Java application. A JVM heapdump is a file produced by the JVM to record the state of the heap at a particular moment in time.
A java core is a snapshot of the threads at work in a JVM. It also details a cross section of information from the major components in the JVM like XM,XE, LK, etc (IBM Javacore only, Sun does not - it just shows threads) A heapdump is a snapshot of JVM memory - it shows the live objects on the heap along with references between objects. It is used to determine memory usage patterns and memory leak suspects. Both can be created by issuing a kill -3 on the PID of the JVM process. There are other ways to gather these docs as well (wsadmin scripts)
The heapdump file location will be reported to stderr (usually the command window) by the JVM. If you set IBM_HEAPDUMPDIR, this directory should be used. Typically the file name will look something like this:
heapdump.YYYYMMDD.HHMMSS.PID.phd
Environment variables control the IBM JVM’s heap dump behavior. They can be set either in the OS environment variables or in the admin console (preferred).
Go to Application servers > server1 > Process definition > Environment Entries (or custom properties in older versions of WAS)
Create the following entries by clicking New:
IBM_HEAPDUMP true
IBM_HEAPDUMPDIR /var/logs/heap
IBM_HEAPDUMP_OUTOFMEMORY true
IBM_HEAP_DUMP true
IBM_JAVACOREDIR /var/logs/core
IBM_JAVADUMP_OUTOFMEMORY true
IBM_JAVA_HEAPDUMP_TXT true
This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.
0 comments:
Post a Comment