Connect to a process using jvisualvm
This tool will allow you to connect to the running process and view all threads and their status. This can show you which stream is the culprit, just looking at the fact that he is awake all the time. You can dump a thread to see the stack trace for each thread and see what each thread does.
This is a very powerful tool for this kind of debugging. It is distributed only with the JDK, so you will need more than just the JVM runtime to access. Make sure you install the same version of the JDK as the JVM.
You will need your X-display to be redirected for this.
Errick robertson
source share