`
jeffen2006
  • 浏览: 255103 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

图解JProfiler监控远程机器

阅读更多

近来我们的服务器频频出现资源耗尽崩溃的情况,于是决定找一款监控的软件进行分析。在javaeye上看了很多帖子后决定使用JProfiler。闲话少说,我们需要监控远端服务器上的程序如何做呢。

准备工作:在本地机器和远端机器上都安装好JProfiler。

一、首先启动JProfiler,出现quick start对话框,选择An application on a remote computer,next。

二、有2个选项,on this computer和on a remote computer,这里是选择被监控的程序的位置,我们选择on a remote computer,同时选择远程机器的类型是windows还是linux等等。

三、填写远程机器地址,我这里是10.1.4.88。

四、填写远程机器JProfiler的安装地址,我这里是D:\Program Files\jprofiler4。

五、选择远程机器的java运行环境,我这里是sun\1.5.0\hotspot。

六、默认监控端口8849。

七、选择Don't wait,立刻启动。

八、选择远程机器读取配置文件的位置,我这里是D:\Program Files\jprofiler4。同时我手工维护配置文件的改动,选择manual同步。

九、这里要注意,重点在这里,我就是没有看这个说明信息才导致前面配置的屡次失败。

Integration type: [Generic application]
Selected JVM: Sun 1.5.0 (hotspot)
Startup mode: Don't wait for JProfiler GUI, startup immediately

Important: The local config file C:\Documents and Settings\sz-xjs-yangy\.jprofiler4\config.xml must be copied manually to D:\Program Files\jprofiler4 on the remote computer when the profiling settings are changed.


(1) Please insert

"-agentlib:jprofilerti=port=8849,nowait,id=166,config=D:\Program Files\jprofiler4\config.xml"  "-Xbootclasspath/a:D:\Program Files\jprofiler4\bin\agent.jar"

into the start command of your remote application right after the java command.

(2) Please add

D:\Program Files\jprofiler4\bin\windows

to the environment variable PATH.

A remote session named Remote application on 10.1.4.88 will be created that connects to a running instance of the remote application that is started with the modified start command.

解释一下,就是将配置文件config.xml 从我本机C:\Documents and Settings\sz-xjs-yangy\.jprofiler4拷贝到\\10.1.4.88\D$\Program Files\jprofiler4, 然后将D:\Program Files\jprofiler4\bin\windows加入到环境变量PATH中,最后运行你的java程序时加入提示的参数。

我就按照这些说明配置好,然后运行我的测试程序jeffen.test1.test1:
D:\yy>java "-agentlib:jprofilerti=port=8849,nowait,id=165,config=D:\Program Files\jprofiler4\config.xml"  "-Xbootclasspath/a:D:\Program Files\jprofiler4\bin\agent.jar"  jeffen.test1.test1

运行成功后。执行下步。

十、 选择yes,finish。

这个远程监控的session就建好了,可以马上连接进行监控了,上面配置中还有些其他的选择,有兴趣的可以看看说明都试试。

 

  • 描述: 向导最后一步
  • 大小: 857.9 KB
  • 描述: 监控10.1.4.88的结果
  • 大小: 1.8 MB
  • jeffen.zip (2.9 KB)
  • 描述: 我的测试程序
  • 下载次数: 519
分享到:
评论
3 楼 tangyuanjian 2007-08-30  
期待结论!
2 楼 zelsa 2007-02-13  
建议发帖时不要用bmp图片,太大,
用jpg或png
1 楼 candyzh 2007-02-13  
你这个内容跟你标题对得上吗?

你这叫图解JProfiler安装!

如果你有什么结论了,麻烦写下怎么使用。

相关推荐

Global site tag (gtag.js) - Google Analytics