</p>

来源: http://weixd.net/?p=6 作者: wei

1. 创建WLST脚本:Threaddump.py

serverName = 'AdminServer'
counter = 0
sleepTime = 5000   #Threaddump时间间隔是5秒

connect ('weblogic','weblogic','t3://localhost:7001')

for counter in range(3):  #做3个Threaddump
java.lang.Thread.sleep(sleepTime)
fileName = 'dump' + serverName + '_' + (java.util.Calendar.getInstance().getTimeInMillis()).toString() + '.dmp'  #Threaddump文件名
threadDump('true', fileName, serverName)

2. 调用脚本

java weblogic.WLST ThreadDumps.py

转载请注明:WebLogic Android 博客 » WLST脚本获取ThreadDump[转]