jdk8及以下版本自带,在jdk的bin目录下,jvisualvm.exe
jdk8以上去官网下载:https://visualvm.github.io/index.html
本地的会自动获取,发布在服务器上的用远程进行连接,发布的程序需配置JVM参数,如下
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=60001 -Dcom.sun.management.jmxremote.rmi.port=60001 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.100.200
点击【线程Dump】得到日志后,进行分析
【数据库】死锁排查方式_数据库查询死锁-CSDN博客