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啓動腳本;

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