Visualvm Working with Remote Applications
来源:互联网 发布:j2ee会用到java吗 编辑:程序博客网 时间:2024/05/04 13:21
Visualvm可以用来监视java程序的运行状况,它可以监视本地或远端的java程序,但是在监视远端的程序时,必须进行设置。
1.在远端机器上安装jdk,必须是jdk;
2.在远端及其上启动jstatd;
参照http://java.sun.com/javase/6/docs/technotes/tools/share/jstatd.html,在jstatd的目录下创建一个策略文件,名字叫做jstatd.all.policy,jstatd.all.policy的内容是
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
这时启动jstatd:
cd /usr/java/bin
./jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname=172.28.xx.xx &
3.用jxm参数启动要监视的java程序,比如:
java -Dcom.sun.management.jmxremote.port=3333 /
-Dcom.sun.management.jmxremote.ssl=false /
-Dcom.sun.management.jmxremote.authenticate=false /
-Djava.rmi.server.hostname=172.28.xx.xx /
YourJavaApp &
4.在本地使用Visualvm连接172.28.xx.xx就可以了。
具体的步骤参见:
http://java.sun.com/javase/6/docs/technotes/guides/visualvm/applications_remote.html
如果出现什么问题,可参见以下的链接:
http://blogs.sun.com/jmxetc/entry/connecting_through_firewall_using_jmxechocomment-1204031889000
http://blogs.sun.com/reichart/entry/jmx_unter_debian
- Visualvm Working with Remote Applications
- Profile your applications with Java VisualVM
- visualvm remote access denied
- java visualVM monitor remote application
- My remote working experience
- 【转载】Allowing applications to play nice(r) with each other: Handling remote control buttons
- VisualVM 使用:Local Applications Cannot Be Detected
- VisualVM: Monitoring Remote JVM Over SSH
- Working with XML nodes
- Working With System Events
- Working with Snort Rules
- Working with XML nodes
- Working with Delegates
- Working with Windows Registry
- Working with EXIF data
- Working with Files
- WORKING WITH SQLite DATABASES
- Working with Kernel Cores
- Symbian 字体汇总
- 关于struts2中sx:datetimepicker标签月份正常显示的解决方法
- 转贴 fatal error LNK1201:
- 伍的博客
- MYsql日志配置及查看
- Visualvm Working with Remote Applications
- 执行脚本报错
- 排序《冒泡》《双重》
- Linux系统的硬件驱动程序编写原理
- javascript应该放在哪里?
- 求职面试中的十二种"高级"错误
- Delphi 7.0常用函数速查手册
- 浮躁
- 获取网站来源,以及搜索引擎来源的关键字