Developer Partner Community

  • July 14, 2015

Exporting the stuck thread count from WebLogic by Qualogy

Juergen Kress
PaaS Partner Adoption


This blog expands on an article by Frank Munz on stuck thread handling – I advise reading his post first, especially if you are having trouble dealing with stuck threads.

What prompted me to write this bit was a question I was asked by one of our customers: “So stuck threads are a signal that some backend system is misbehaving. How can we monitor the number of stuck threads in WebLogic server?” Searching online, the first few pages in Google come up with administrators asking the same question.

Some solutions offered:

· The WLDF can trigger on stuck threads, so you can have it send you a mail or an SNMP trap, but it’s very limited in functionality.

· Stuck threads can be hogging threads as well and in WLST the total count of hogging threads is an attribute of a server runtime. That’s easily found and manipulated in a WLST script. But that’s not a trustworthy indicator!

· Use jstack, then count the number of “[STUCK]” instances.

Only that last one can be used to build historic data, but even then it triggers on any stuck thread, you have to do a lot of string parsing to count only threads you are interested in.

Strangely enough nobody offered the OEM. Oracle Enterprise Manager can monitor stuck threads and saves historic data and even allows some very cool toolings. But if OEM has a Stuck Threads metric that means there’s also an MBean. And it is, but it takes some digging through the runtime MBean tree. Browsing with WLST, every deployment gets a workmanager and if no specific workmanager is added, a copy of the default work manager configuration is used. And that in turn has a StuckThreadCount attribute.

Here’s a script that counts all of these per server: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Technorati Tags:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.