Created
February 5, 2016 09:34
-
-
Save bobbyjam99-zz/147d5a4d2cdfc3c10b10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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