jprofiler的安装

来源:互联网 发布:mac卸载virtualbox 编辑:程序博客网 时间:2024/04/30 08:44

jprofiler 的安装需要做两方面的工作

1.      客户端(监控端):在windows上的,配置要监控的服务器实例

2.      服务器(linux):有三个版本, 我测试用的是 .gz 版本的 ,上传到服务器端, /opt目录为例,配置的时候需要用到

3.  前提条件安装好JDK,服务器软件,配置好环境变量

jprofiler 的配置

1.      客户端设置:需要在客户端配置要监控的服务器实例,根据提示进行配置,步骤:

1.  选择服务器的操作系统

      2.      设置服务器的IP地址

             3.      指定jprofiler在服务器端的安装位置如:/opt/jprofiler5

             4.      选择支持服务器运行的JVM版本(服务器的JVM版本)

             5.      指定jprofiler 通信的端口

             6.   选择是否等待服务器端jprofilerGUI启动后连接,我们选择 don’twait,startup immediately

             7.   选择怎么同步你的被监控端的配置文件,我们选择manual synchronize手工同步

             8.   点击NEXT 即可完成你的客户端配置 

             9.   8步的提示的信息是需要在服务器端添加的配置信息 windows服务器版本)

Integration type:[Generic application]

Selected JVM: Sun 1.5.0(hotspot)

Startup mode: Don'twait for JProfiler GUI, startup immediately

 

(1) Please insert   (添加在服务器启动脚本中的JAVA_OPTIONS)

"-agentlib:jprofilerti=port=8849,nowait,id=106,config=C:/Documents andSettings/Administrator/.jprofiler5/config.xml"  "-Xbootclasspath/a:E:/ProgramFiles/jprofiler5/bin/agent.jar"

 

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

 

(2) Please add   (服务器端添加的jprofiler环境变量)

E:/ProgramFiles/jprofiler5/bin/windows

 

to the environmentvariable PATH.

 

A remote sessionnamed Remote application on localhost will be created that connects to arunning instance of the remote application that is started with the modifiedstart command.

 

2. 服务器端配置

1. 将配置客户端实例产生的配置文件(C:/Documentsand Settings/Administrator/.jprofiler5/config.xml)拷贝到 服务器端目录下 /opt/confi.xml

2. 在服务器端添加jprofiler 环境变量

   在 .bash_profiler 文件中添加 LD_LIBRARY_PATH=/opt/jprofiler5/bin/linux-x86    export LD_LIBRARY_PATH

              3. 修改服务器的启动脚本 (以我创建的服务实例路径为例)

                           Weblogicserver 实例的启动脚本/bea/user_projects/domains/base_domain/bin/startWeblogic.sh中JAVA_OPTIONS 的增加环境变量 为图中画红线部分,环境变量当中 id 属性要与配置文件 session中的 id对应,session id="103" name="BEAWeblogic 9.2, Type: Server on 192.168.1.199"

4.重新启动weblogic 即可,成功画面

start

   服务器配置成功之后,还需要在监控端把Jprofiler的config.xml复制到你的工作目录,打开Jprofiler的配置的实例就可以开始监控了

  

 

原创粉丝点击