There is some way of monitoring Java Applications.
I will introduce a Simple way of them.
There is a Java Applications, the process id is 43413.
And look for a thread id the usage a lot of CPU by ps command.
ps -mo pcpu,lwp -p 43413| sort -r -n | head
so we can check the usage of CPU by thread ordered.
Look at the right side, that is a thread id, it’s a decimal value.
we have to convert to a hex value.
use this online converter.
Convert the decimal value 75960 to hex is 128B8.
Next, then let’s get a thread dump.
kill -3 43413
Finally, find a dump data by value of 128B8, And check and fix your the code.