JProfiler4.3.2 远程 监控 配置

准备工作:在本地机器和远端机器上都安装好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。

七、Wait for ……   为了在开发环境中获取监控的信息,它将等待远程计算机上的Jprofile GUI 启动,并和本机建立连接,这种方式比较便于修改jprofiler的配置信息。  
        Don't wait for …… 不必等待远程计算机的Jprofile GUI 先启动和建立连接,立即启动。但在启动远程应用程序前必须校验当前所配置会话的配置文件。虚拟机参数将参考Jprofile 的config 文件的路径。

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

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

同步方式:
    Manual synchronization;copy to diretory;execute command:
      提供三种同步方式,这里我选择的是第一个手工同步。

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

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程序时加入提示的参数。

如果监控tomcat,则在canalina.bat 内增加

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

 

十、 选择yes,finish。

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

 

注意:

拷贝config.xml 到远程时,必须完成第10步。在第9步的时候config.xml 未完成,此时拷贝,会出现 session=166 找不到

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值