特別提示:本人博客部分有參考網絡其他博客,但均是本人親手編寫過並驗證通過。如發現博客有錯誤,請及時提出以免誤導其他人,謝謝!歡迎轉載,但記得標明文章出處:
http://www.cnblogs.com/mao2080/
1、問題描述
在做S3下載壓力測試,需要對服務器進行性能監測,由於時間問題就使用JDK自帶工具來監測。
2、操作方法
1、啟動命令
1、Linux啟動jar命令
java -Djava.rmi.server.hostname=替換成服務所在ip -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar test-1.0-SNAPSHOT.jar
2、Windows啟動jar命令
java -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar test-1.0-SNAPSHOT.jar
2、工具目錄

3、添加JMX
如果是本機選擇本機點擊右鍵-》添加JMX連接-》輸入端口1099
如果是遠程選擇遠程點擊右鍵-》添加JMX連接-》輸入端口1099

4、打開監控

5、注意事項
檢查防火牆,端口1099要開放。
