Java process thread details

I’d like to get the details like name, running time, etc. of threads of a Java process on a production VM, similar to the info that VisualVM shows in the Threads tab. Unfortunately, VisualVM won’t run without JDK installed. Is there any light-weight alternative for Windows?
I’ve already tried the PowerShell command

Get-CimInstance win32_thread -filter “handle = ThreadID”

It does not show anything useful for me.

Answer

I managed to get the info that I needed in 2 steps.

  1. Obtained IDs of threads that kept CPU busy using Performance Monitor
  2. Copied jstack and the necessary components from JDK as described in the answer

Then I found the details of the threads in the output of jstack using thread IDs from step 1.

Attribution
Source : Link , Question Author : Ivan Gerken , Answer Author : Community

Leave a Comment