Thanks to my mate, Mike, for this.
<caveat emptor>
Want to force a WAS JVM ( or, almost certainly, any other JVM ) to generate a core dump ( Javacore ) ?
Using Unix ?
If so, identify the Process ID ( PID ) of the JVM, perhaps using ps auxw | grep -i java and then, once you've checked AND double-checked that it's the right PID, issue this command: -
$ kill -3 12345
( where 12345 is an example of the PID )
The Javacore will be, by default, written to the WAS profile root e.g. /opt/IBM/WebSphere/AppServer/profiles/AppSrv01.
Want to force a heap dump ?
If so, fire up wsadmin: -
$ cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
$ ./wsadmin.sh -lang jacl
wsadmin> set objectName [$AdminControl queryNames WebSphere:type=JVM,process=<JVM Name>,node=<Node Name>,*]
which returns something like this: -
WebSphere:name=JVM,process=bpmPCapp01-server01,platform=proxy,node=primary_base,j2eeType=JVM,J2EEServer=base-bpmPCapp01-server01,version=7.0.0.25,type=JVM,mbeanIdentifier=JVM,cell=ProcCtr03Cell,spec=1.0
wsadmin> $AdminControl invoke $objectName generateHeapDump
Again, the heap dump will be, by default, written to the WAS profile root e.g. /opt/IBM/WebSphere/AppServer/profiles/AppSrv01.
WebSphere:name=JVM,process=bpmPCapp01-server01,platform=proxy,node=primary_base,j2eeType=JVM,J2EEServer=base-bpmPCapp01-server01,version=7.0.0.25,type=JVM,mbeanIdentifier=JVM,cell=ProcCtr03Cell,spec=1.0
wsadmin> $AdminControl invoke $objectName generateHeapDump
Again, the heap dump will be, by default, written to the WAS profile root e.g. /opt/IBM/WebSphere/AppServer/profiles/AppSrv01.
</caveat emptor>
Remember - your mileage may vary - if in doubt, do nowt