Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

WebLogic has an excellent administration console that lets you monitor threads but that is limited to real-time monitoring. Unless you have additional software like OEM, you have to do a little extra work to get historical performance data out of WebLogic.

Recently I had a need to check on the usage of the WebLogic thread pool and given some of the constraints I've been working with, the easiest way to do that was to go look into the WebLogic managed server logs. These were found in $DOMAIN_HOME/servers/<managed_server>/logs.

The managed server log has INFO level log entries like this...
 Managed Server Log
####<Jun 27, 2019 9:16:22,429 PM AEST> <Info> <WorkManager> <host.domain> <managed_server> <Timer-2> <<WLS Kernel>> <> <uuid> <1561634182429> <[severity-value: 64] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-002959> <Self-tuning thread pool contains 1 running threads, 3 idle threads, and 20 standby threads>

With a few commands this can be filtered down to something more usable like a CSV file...
ls -rt *.log* | xargs grep "Self-tuning thread pool contains" | awk -F"<" '{print $2 $15}' | awk '{print $18 "," $14 "," $11}' > thread_history.csv

This gives us output that looks like the sample below (note the output of thread pool statistics are in reverse order vs what is written into the log file). The CSV file columns are thread counts for "standby, running, idle".
 CSV File

I found the best plot for this was an area plot, which nicely superimposes active and idle threads on the standby threads due to the order of columns in the CSV file (that's why the order of these was reversed above). The result looked something like this...

Here the running threads are shown in orange, idle threads in blue and standby threads in grey.

You can get a bit more fancy with this and also extract the date/time components from the log file but given these statistics are logged every 2 minutes, it's hardly necessary.

Using this approach was a quick way to see if my WebLogic server was coming close to it's maximum thread pool capacity. If you find this useful, do share your plots, I'd love to see how other servers are running!


Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...