When using WLST to generate thread dumps the tool will be able to
analyze thread dumps if the server is running JRockit but will fail if
it is running Sun JVM. I tested this on a box running Windows XP as
well as Server 2003 and Server 2008.
The result is always the same.
My WLST script is as follows:
=============== Beginning of Script ==========================
from java.lang import *
from java.util import Date
d= Date()
sleepMillis = 10000
maxIterations = 5
uid="weblogic"
pwd="weblogic"
url="t3://localhost:7001"
srvName="AdminServer"
tdumpFileName = "ThreadDump_%s_%s.log" % (srvName,d.time)
tdumpAggFile = open('c:/temp/%s' % tdumpFileName, 'a')
#Connect to the Admin Server
connect(uid,pwd,url)
for x in range (0,maxIterations):
currentFile = 'Thread_Dump_%s_%s_%s.log' % (srvName, d.time,x)
threadDump(writeToFile='true', fileName=currentFile,
serverName=srvName)
currentFileRead = open(currentFile, 'r')
tdumpAggFile.writelines(currentFileRead.readlines())
currentFileRead.close()
Thread.sleep(sleepMillis)
tdumpAggFile.close()
disconnect()
=============== End of Script ==========================
It is very common to use WLST to generate thread dumps rather than CTRL
+BREAK specially on those servers where Weblogic is running as a
service.
If needed I could upload the Thread Dump samples.