Skip to content

Instantly share code, notes, and snippets.

@bobbyjam99-zz
Created February 5, 2016 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyjam99-zz/147d5a4d2cdfc3c10b10 to your computer and use it in GitHub Desktop.
Save bobbyjam99-zz/147d5a4d2cdfc3c10b10 to your computer and use it in GitHub Desktop.
host='localhost'
port='7001'
user='weblogic'
passwd='weblogic'
server='AdminServer'
POOLTHREADRUNTIME='ThreadPoolRuntime/ThreadPoolRuntime'
JVMRUNTIME='../../JVMRuntime/'+server
connect(user,passwd,"t3://"+host+":"+port)
serverRuntime()
cd(POOLTHREADRUNTIME)
while 1==1 :
l=cmo.getQueueLength()
if (int(l)) > 0:
print 'Queue Length: '+str(l)
cd(JVMRUNTIME)
print 'Taking Server Thread Dump'
dump = cmo.getThreadStackDump()
f = open('ThreadDump.txt', 'a')
f.write('===== FULL THREAD DUMP ===============')
f.write(dump)
f.write('===== END OF THREAD DUMP ===============')
f.close()
cd('../../ThreadPoolRuntime/ThreadPoolRuntime')
else:
print 'Queue Length: '+str(l)
java.lang.Thread.sleep( 5000 )
exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment