0

We are using Spring Boot for our restful services. Today for other reasons I visited the Spring Boot Admin Threads page and discovered the following statistics:

Blocked count   307
Blocked time    -1
Waited count    398265
Waited time -1
Lock name   java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@7e0ca0e
Lock owner id   -1
Lock owner name 
sun.misc.Unsafe.park(Unsafe.java:-2) native
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
java.lang.Thread.run(Thread.java:-1) 

Does the blocked count indicate that there are currently 307 blocked threads or is that the total number of threads that have been blocked and the waited count is a total of the number of threads that have had to wait on the blocks?

I am unable to find a decent explanation of the values shown on the threads display and would appreciate it if somebody could explain these figures.

theINtoy
  • 3,388
  • 2
  • 37
  • 60

1 Answers1

2

The javadoc from java.lang.management.ThreadInfo helps out:

Returns the total number of times that the thread associated with this ThreadInfo blocked to enter or reenter a monitor. I.e. the number of times a thread has been in the java.lang.Thread.State#BLOCKED state.

joshiste
  • 2,638
  • 1
  • 14
  • 19