How to retrieve the current stack information from a WebLogic server continuously?

Question:
User Mick O'Donnell posted this question 30776122 on stackoverflow portal, which is about getting stack dump or thread dump from WebLogic server.

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 :)

Introduction:
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.

Solution:
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.