天天看点

用JMX监测JVM的运行参数

http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html

http://blog.csdn.net/wangchengsi/archive/2008/01/01/2008413.aspx

我在性能测试过程中,监控jvm进程的资源使用情况,方法是:

1、JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=服务器IP"

把这个加到启动参数里

2、启动visualVM软件监控