Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

How to chart active threads?


I know there is an OOTB 'Thread Count' measure for JVM and .NET, but that shows the total number of threads for that time frame. I am interested in only the active threads at a given time.


Dynatrace Pro
Dynatrace Pro

Active threads in the java world usually comes from application server specific measures (JMX). For instance with tomcat there is a thread pool current busy threads measure.

For .net, try .net thread count under .net common language run time.

So, my client is interested in knowing the number of active threads on their Fatwire servers. I am not sure if the tomcat measure would apply to that. Would there be any other way to track them besides doing a thread dump?


fatwire seems to run on Tomcat so the measure I suggested should be sufficient.

However, I have seen that Oracle bought this company so it might now run on weblogic (that's their own app server) but I haven't checked if that's the case.

Check which app server it is running on first.

Dynatrace Pro
Dynatrace Pro

There are two related measures which are provided out of the box:

  • JVM - Thread Count
  • Process Performance - Current thread count

The second one is the OS-level thread count, so you are probably looking for the first one, which provides the overall number of threads in the Java process. Both should be available as soon as the Java agent is injected.

The JMX measures from applications servers often provide more specialized information, like number of active threads in thread-pools, which can add additional insight when looking for specific issues or general monitoring, so it might still be useful to record these values as well.

Hi Dominik,

My Application team is using the Java melody for the monitoring which has the metric called active threads, the measure within the dynatrace busy threads is not helping while the application is in hung mode. Do we need to create the custom measure using the JMX for the active threads which gives us the same data as like the Java melody, if so how to configure that ?



Yes you would need to configure a new JMX measure. To do this create a new measure, select your app server and add a new Custom JMX measure. Once you have the measure configurations open there should be a browse option to view the available JMX measures for that server. Find the one you want (there is a test option to verify the metric returned by that item) and create the measure. This should get you what you need.

NOTE: adding JMX measures can cause additional overhead in the application (normally seen in exsessive cases)


I have tried this and found the exact measure which matches the value of the Java melody active thread measure. I picked the metric NumActive from the ConnectionPool, which is accurate and also with Thread Pool busy threads measure it's providing the similar graph and data which is matching with Java melody based on analysis of monitoring data for one month..

I'm not fully familiar with JavaMelody, however it looks to be open source and it appears to be using JMX measures to build this out. I would take a look at trying to reverse engineer the software at this point to find the exact MBean you are looking for.


Could some one help in getting the same setting to check active threads for .net Application