Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to trigger a thread dump for WebLogic server as soon as the server goes into a low thread count state?

we have a WebLogic setup that has been giving us some problems.

We have a monitoring tool called HP BAC that helps us visualize the state of the servers, and we tie this tool with the Java Thread Dump utility such that when there is a low thread count situation, a thread dump will be captured.

There are situations where the server goes into a low thread count state, and we are uncertain why because all our efforts to find out - through thread dumps especially seems futile.

Given the "state of art", our thread dump capture is always triggered late / after, and always never capture thread dump useful for our investigation.

I would like to check how the rest of you guys have put in place such monitoring efforts?

enter image description here

like image 672
Oh Chin Boon Avatar asked Dec 04 '22 21:12

Oh Chin Boon


1 Answers

I'd suggest WLST

Write a WLST script which hooks into the running server and gets the active thread count at regular intervals. (say 30 seconds)

If your active thread count goes below your pre-configured threshold, fire the kill - 3 and get the thread dump.

Some examples

http://middlewaremagic.com/weblogic/?p=5423

http://wlstbyexamples.blogspot.com/2009/04/wlst-thread-count.html

like image 85
JoseK Avatar answered Mar 24 '23 00:03

JoseK