JProfiler7 Windows客户端监控Linux-适用于Tomcat监控

监控方式介绍:
1.Wait for a connection from the Jprofiler GUI,此模式为,在启动Weblogic时,需要等Jprofiler连接后才能启动;
2.Start Immeditely,此模式下, Weblogic独立启动,Jprofiler随时可以连接;
3.Profile offline, Jprofiler GUI cannot connect 此模式为离线模式,生成相关记录文件事后分析;

一、准备工作:
1.Windows上安装 jprofile,并选择要监控的操作系统平台,此处要求联网,以下载相应平台支持的agent;
2.从WebLogic 部署的服务器的domain Server 的bin目录下找到“startWebLogic.sh” 并下载到D:\
3.在weblogic服务器端的建立目录结构:/opt/jprofiler (此便后续使用)

二、建立一个连接Session
步骤:
session->startCenter->new Session->New Server Intergration -> BEA Weblogic 10x ->on a remote computer->Linux X86/AMD64->JVM Vendor:sun->version:1.6.0->mode:hotspot ->Start immediately, connect later with Jprofiler GUI ->remote addree:”<Weblogic服务器的IP地址>”->remote installation directory:/opt/jpofiler/->Create archive with profiling agent is the directory: d:\-> locate the start script: d:\startWebLogic.sh -> Jprofiler port: 8849 -> next -> No, I will start the session later;

三、修改启动文件
1.查找配置信息,打开文件:C:\Users\Administrator\.jprofiler7\config.xml 此文件为jprofiler配置,找到行
<session id="101" name="BEA Weblogic 10.x on "  注:此行为刚才建立Session后生成的配置信息,记录此ID号101
2.修改Weblogic启动文件,打开文件:D:\startWeblogic_jprofiler.sh (此文件是刚才建立Session时生成的),找到此行:
JPROFILER_OPTIONS="-agentpath:/opt/jprofiler/bin/linux-x86/libjprofilerti.so=port=8849,nowait $JPROFILER_OPTIONS"

修改信息后如下:
JPROFILER_OPTIONS="-agentpath:/opt/jprofiler/bin/linux-x86/libjprofilerti.so=port=8849,nowait,id=101,config=/opt/jprofiler/config.xml $JPROFILER_OPTIONS"
注意红色部分,将根据你自己的配置文件信息和weblogic服务器端配置信息有可能不同;

四、上传相关文件:
1.上传C:\Users\Administrator\.jprofiler7\config.xml文件至Weblogic所在服务器/opt/jprofiler/的目录下
2.上传D:\startWeblogic_jprofiler.sh至Weblogic所在服务器的Weblogic的domain的bin目录下,如我的目录地址:/weblogic/bea/user_projects/domains/base_domain/bin

五、启动Weblogic
先停止相关Weblogic,再用命令行启动:
sh startWebLogic_jprofiler.sh &
此文件是刚才上传的带jprofiler启动脚本;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章