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...
 Command
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
...
14,0,2
4,11,1
9,6,1
4,11,1
...




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...
wlsthreads.png

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!

-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.