Usando um Profiler Gratuito no Java (VisualVM, JConsole)

Java VisualVM

JConsole

VisualVM is also free and ships with the Java SDK. Its a bit like JConsole but with better lipstick and more advanced monitoring features. VisualVM takes application monitoring one level deeper than JConsole by allowing the user to analyze thread execution as well as the ability to profile CPU and memory usage of JVM requests, both of which are triggered manually by the user

Quais comandos necessários?

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.59.99

Referências

Comparação VisualVM, JProfiler e AppDynamics Lite
https://www.appdynamics.com/blog/engineering/application-monitoring-with-jconsole-visualvm-and-appdynamics-lite/

VisualVM no Debian
https://packages.debian.org/buster/visualvm

Colocando login e senha no JMX
https://www.ibm.com/docs/en/elm/6.0.1?topic=ejat-option-setting-up-jmx-client-authentication-without-ssl

Propriedades da JVM para rodar o VisualVM com o JMX
https://stackoverflow.com/a/58776232

You should also read: