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

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

CPU Sampling vs Thread Dumps

Hi Community,

I'm a bit confused about some details of the CPU Sampling and Thread Dump results.

I always thought that I can see waiting threads also in the CPU samples as I can often see some Methodcalls of wait() in the traces.

But when we tried to analyse some problems with stuck threads in a jboss environment the thread dump shows more threads than a CPU sample which ran for 2 minutes and also during the time the thread dump was taken.

Is it possible that I can only see those threads which were actually calling the wait() method during the sample but not for those which were just waiting the whole period of sampling?




Dynatrace Champion
Dynatrace Champion

hi Gerald,

one quick question upfront: are you referring to Classic Agents or OneAgents?

currently I can't think of a good reason for missing threads during CPU sampling apart from some maximum thread limits that we might have in the Agents (specifically OneAgent).

CPU sampling should always query all the stacktraces from the JVM itself, so there shouldn't be any missing.

can you provide us such an example with both CPU sampling and thread dump where you experience missing threads? that would be great!

thx, Christian

Hi @Christian S.,

Well I think I'm not allowed to share those dumps in public. Would you mind if I send them via mail?

The dumps were collected by the old java agents.



Dynatrace Pro
Dynatrace Pro

Hi All,

Please also note that native threads with no java stack frames, will never be seen in a CPU sampling.

Also consider unchecking the option "only active" to see all threads in the CPU sampling dashlet.



great hint! especially about the "only active" option ... I did not know that we have this. 🙂

@Gerald: please try Harry's suggestion, thx.


Hi Harry,

Yes you're right the option "only active" did the trick.

thank you!