Monday, July 8, 2013

WebSphere: Generating Dumps

using WSAdmin script

Create Java Core Dump
$ vi javacoredump.py

def generateThreadDump(serverName):
   serverJVM = AdminControl.queryNames("type=JVM,process="+serverName+",*")
   AdminControl.invoke(serverJVM,"dumpThreads")

generateThreadDump("server1") 



$  /opt/IBM/WebSphere/AppServer/profiles/AppSrv/bin/wsadmin.sh -lang jython -f javacoredump.py

$ ls -lrt  /opt/IBM/WebSphere/AppServer/profiles/AppSrv

 -rw-r--r--  1 root root 7126921 2013-07-08 12:57 javacore.20130708.125741.19269.0001.txt

=================================================================================

Create Heapdump

$ vi heapdump.py
def generateThreadDump(serverName):
  serverJVM = AdminControl.queryNames("type=JVM,process="+serverName+",*")
  AdminControl.invoke(serverJVM,"generateHeapDump")

generateThreadDump("server1")
 

$  /opt/IBM/WebSphere/AppServer/profiles/AppSrv/bin/wsadmin.sh -lang jython -f heapdump.py

$ ls -lrt  /opt/IBM/WebSphere/AppServer/profiles/AppSrv
-rw-r--r--  1 root root 94183104 2013-07-08 13:18 heapdump.20130708.131755.19269.0002.phd



Getting Heapdumps on the Solaris platform
http://www-01.ibm.com/support/docview.wss?uid=swg21242314

 

No comments:

Post a Comment