Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 知乎专栏 | 视频教程 | About

第 16 章 JVM

目录

16.1. jconsole
16.2. jps - Java Virtual Machine Process Status Tool
16.3. jinfo - Configuration Info
16.4. jstat - Java Virtual Machine Statistics Monitoring Tool
16.5. jHiccup
		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
	

16.1. jconsole

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