inotgaoshou 发表于 2013-1-31 12:16:53

jvisualvm监控服务端内存使用

用jvisual远程监控jvm的内存。步骤1:在Linux服务器端建立文件:jstatd.all.policy,      文件内容为:    grant codebase "file:${java.home}/../lib/tools.jar" {            permission java.security.AllPermission;      };步骤2:启动jstat服务    jstatd -J-Djava.rmi.server.hostname=192.168.8.28 -J-Djava.security.policy=jstatd.all.policy-J-Dcom.sun.management.jmxremote.port=2000-J-Dcom.sun.management.jmxremote.ssl=false-J-Dcom.sun.management.jmxremote.authenticate=false最好后台启动该服务,使用如下方式:nohup jstatd -J-Djava.rmi.server.hostname=192.168.8.28 -J-Djava.security.policy=jstatd.all.policy-J-Dcom.sun.management.jmxremote.port=2000-J-Dcom.sun.management.jmxremote.ssl=false-J-Dcom.sun.management.jmxremote.authenticate=false &Djava.rmi.server.hostname为本机的ip地址,Djava.security.policy为步骤1创建文件的路径,Dcom.sun.management.jmxremote.port为jmx的端口步骤3:在客户端启动jvisualvm.exe即可。
页: [1]
查看完整版本: jvisualvm监控服务端内存使用