OpenJDK 11 thread dump output elapsed time vs cpu time
Issue
What does elapsed time in the OpenJDK 11 thread dumps mean?
What does cpu time in the OpenJDK 11 thread dumps mean?
How to get the cpu time over run time of the thread?
How to deduce cpu usage in that time via cpu/elapsed time of thread in a thread dump without htop/top?
Example of thread with cpu and elapsed:
"remote-thread-example" #50858 daemon prio=5 os_prio=0 cpu=3018.88ms elapsed=344.31s tid=0x000055775193b000 nid=0x11858 waiting on condition [0x00007fbe7323a000]
java.lang.Thread.State: TIMED_WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@11.0.7/Native Method)
- parking to wait for <0x00000000aca3ac80> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.7/LockSupport.java:234)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(java.base@11.0.7/SynchronousQueue.java:462)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(java.base@11.0.7/SynchronousQueue.java:361)
at java.util.concurrent.SynchronousQueue.poll(java.base@11.0.7/SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.7/ThreadPoolExecutor.java:1053)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.7/ThreadPoolExecutor.java:1114)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.7/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base@11.0.7/Thread.java:834)
Environment
- OpenJDK 11
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.