Java多執行緒監控分析工具(VisualVM)/JConsole
阿新 • • 發佈:2019-01-25
grant codebase ”file:${java.home}/../lib/tools.jar"</span><span> { </span></span></li><li><span>permission java.security.AllPermission; </span></li><li><span>}; </span></li></ol></pre> <p>II:vi jmxremote.password去掉</p> <p># monitorRole QED</p> <p># controlRole R&D</p> <p>的#號</p> <p>2:在Jboss的啟動檔案中新增以下資訊:</p> <pre><ol><li><span><span>JAVA_OPTS="-Dcom.sun.management.jmxremote.port=</span><span>2899</span><span> \ </span></span></li><li><span>-Dcom.sun.management.jmxremote.ssl=</span><span>false</span><span> \ </span></li><li><span>-Dcom.sun.management.jmxremote.authenticate=</span><span>false</span><span> \ </span></li><li><span>-Djava.rmi.server.hostname=</span><span>10.212</span><span>.</span><span>20.9</span><span> 其他配置" </span></li></ol></pre> <p>3:檢查啟動情況:</p> <p>netstat -a | grep -i 2899 檢視端口占有情況</p> <p>如果2899埠被其他程式佔用,在jboss配置檔案中調整埠-Dcom.sun.management.jmxremote.port=****</p> <p>而後在VisualVM中就新增遠端連線,選擇jmx方式,就可以監控jboss的執行情況了。</p> <p><strong>參考文件:</strong></p> </div> <div> <p>1:<a target="_blank" rel="nofollow" href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstatd.html">jstatd的幫助文件</a></p> <p>2:<a target="_blank" rel="nofollow" href="https://visualvm.dev.java.net/zh_CN/gettingstarted.html">VisualVM的幫助文件</a></p> <p>3:<a target="_blank" rel="nofollow" href="http://java.sun.com/javase/6/docs/technotes/guides/visualvm/jmx_connections.html">Java VisualVM 的文件</a></p> <p>4:<a target="_blank" rel="nofollow" href="http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole">JConsole的FAQ</a></p> <p>5:<a target="_blank" rel="nofollow" href="https://tda.dev.java.net/">Thread Dump Analyzer 幫助文件</a></p><p><br></p><p><br></p><p><br></p><p><b>JConsole</b></p><p><br>到$JAVA_HOME/bin,點選jconsole.exe圖示就可以啟動JConsole,