How to retrieve the current stack information from a WebLogic server continuously?
Thanks to Brett Walker that he addressed WLSDM. Absolutely, he redirected to the right place.
Now, we’re going to explain how it’s easy to do this by using WLSDM which is aimed to monitor WebLogic domains naturally :)
Normally, it’s easy to do by shell and WLST scripting; but getting thread dump continuously can be challenge and risky. It can create an overhead on your WebLogic domain.
Let’s say you’re familiar with WLSDM. It’s really easy to install WLSDM and use it. If you’re not introduced with WLSDM for WebLogic just follow this blog post on WLSDM community portal. WLSDM Intorduction
Step-1: Go to “Configuration / System” Page and focus on “system.metric” tab. There are two important properties on WLSDM configuartion/system page. Metric harvest frequency and number of alarm count till alarm situation is valid. Screenshot is below and values are default.
The harvest frequency and number of alarm count can be changed. For the continues thread dump, just set it more than 1. Let’s set the value to 10. Which means 10 alarms would be generated if the situation is still valid.
Step-2: Go to “System / Metrics” page. For instance, find ActiveExecuteThread MBean record, then click on “Edit” button. There is Actions button for each servers on WebLogic domain (Screenshot Number-1). Click on actions button and select “Thread Dump” action (Screenshot Number-2) and save. Check below screenshot:
Step-3: The alarm must be enable by setting a threshold value which is less than current ActiveExecuteThread MBean value in ThreadPoolRuntime.
After all, WLSDM would start notifying you via email by attaching “WebLogic Server Thread Dump” or “Dump Stack” files continuously. Check below screen shot.
- WLSDM created ALERT notifications every 30 seconds by attaching thread dump files. See pointer.
- Thread dump files attached to emails.
- Also the thread dumps are listed on “Profiling Dumps” page on WLSDM console.
- See details of thread dump on WLSDM console.
- It’s possible to analyze thread dumps by using WLSDM’s thread dump viewer and analyzer module.
- Besides thread dump action, there are even more actions available on WLSDM. These are:
- Java Flight Recorder (JFR)
- Heap Dump (.HPROF)
- WebLogic Diagnostic Framework (WLDF) Image (.ZIP)
If you want to learn much about WLSDM actions, there is a good tutorial on Youtube. Here is link: https://www.youtube.com/watch?v=ec-MccMPCqY (WLSDM Actions)
Hope, you enjoy this detailed answer on WLSDM community portal.
WLSDM Support Team
3- Other YouTube tutorials available.
Installation is really easy and you can setup a complete monitoring infrastructure in less than 5 minutes. If you want to try then go to download page below URL: