知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
目錄
jps: http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html jstat: http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstat.html jmap: http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jmap.html
jconsole: http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html
java -jar -Djava.rmi.server.hostname=192.168.0.1 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=911 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false netkiller-1.0-SNAPSHOT.jar
如果是雲主機,配置 java.rmi.server.hostname=192.168.0.1 為內網IP地址,這樣只能從內網監控 JVM。如果僅僅是開發調試可以不用設置 java.rmi.server.hostname
java -jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=911 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false netkiller-1.0-SNAPSHOT.jar
啟動 jconsole
jconsole localhost:911