<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-86  評論-33  文章-0  trackbacks-0

    Windows客戶端的JProfiler遠程監控Linux上的Tomcat

    1.測試環境

    服務器:RedHat Linux 3.4.3-9.EL4(內核版本 2.6.9-5.EL),Tomcat5.5.20,Sun JDK 1.5.0_09,JProfiler 4.3.2 for linux(安裝包:jprofiler_linux_4_3_2.sh)
    客戶端:Windows XP,JProfiler 4.3.2 for windows(安裝包:jprofiler_windows_4_3_2.exe)

    2.JProfiler軟件下載地址 http://www.ej-technologies.com/

    3.客戶端 JProfiler 安裝 略

    4.服務器端 JProfiler 安裝:
    把 jprofiler_linux_4.3.2.sh 上傳到到服務器,假設路徑為 /opt/jprofiler

    # cd /opt/jprofiler
    # chmod +x *.sh
    # ./jprofiler_linux_4.3.2.sh -c
    按照提示來安裝,提示都很簡單,不在多說。安裝路徑選擇 /opt/jprofiler4

    注意,這里的 -c 意思是用字符方式來安裝,如果機器上沒有 X 則加上該參數.

    5.客戶端連接配置
    1). 運行 JProfiler 。第一次打開會有向導,忽略它。
    2). 選擇 Session->Integration Wizard->New Remote Integratation
    3). 選擇 On a remote computer;Platform of remote computer 選擇 Linux x86/AMD 64;Next
    4). 輸入服務器 IP ;Next
    5). 輸入服務器上的 jprofiler 的安裝路徑,如 /opt/jprofiler4 ;next
    6). 選擇服務器的 JDK 環境,這里是:Sun,1.5.0,hotspot;next
    7). 輸入端口:這里是默認值 8849;next
    8). 選擇啟動模式:這里選第一種 wait for a connection from the jprofiler GUI;next
    9). 這里會列出需要在服務器端做的配置:

    Integration type: [Generic application]
    Selected JVM: Sun 
    1.5.0 (hotspot)
    Startup mode: Wait 
    for JProfiler GUI

    (
    1) Please insert

    -agentlib:jprofilerti=port=8849  -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar

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

    (
    2) Please add

    /opt/jprofiler4/bin/linux-x86

    to the environment variable LD_LIBRARY_PATH.

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


    6.服務器端的配置
    (1)修改系統環境配置文件 /etc/profile ,增加

    JPROFILER_HOME=/opt/jprofiler4/bin/linux-x86
    export LD_LIBRARY_PATH
    =$LD_LIBRARY_PATH:$JPROFILER_HOME


    (2)修改TOMCAT啟動文件catalina.sh,添加-agentlib:jprofilerti=port=8849  -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar 內容到CATALINA_OPTS中;
    “-agentlib:jprofilerti=port=8849  -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar ” 此內容由客戶端軟件生成

    CATALINA_OPTS="$CATALINA_OPTS -Xms128m -Xmx128m $JPDA_OPTS -agentlib:jprofilerti=port=8849  -Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar"


    7.Reboot Linux and startup Tomcat using startup.sh;
       The log of tomcat which is $CATALINA_HOME/logs/catalina.out will show:

     JProfiler> Protocol version 23
     JProfiler
    > Using JVMTI
     JProfiler
    > 32-bit library
     JProfiler
    > Listening on port: 8849.
     JProfiler
    > Native library initialized
     JProfiler
    > Waiting for a connection from the  JProfiler GUI 

     

    8.啟動客戶端軟件
       點擊jprofiler菜單 session>start center>Open Session
       Available session configurations中列出了剛才配置的連接,選中使用就OK了??!

    9.The log of tomcat which is $CATALINA_HOME/logs/catalina.out will show:

     JProfiler> Using dynamic instrumentation
     JProfiler
    > Time measurement: elapsed time
     JProfiler
    > CPU profiling enabled
     JProfiler
    > Hotspot compiler enabled
     JProfiler
    > Starting org/apache/catalina/startup/Bootstrap 

     

    10.當中斷JProfiler連接時
       The log of tomcat which is $CATALINA_HOME/logs/catalina.out will show:

     JProfiler> Disconnected. Waiting for reconnection.
     JProfiler
    > Listening on port: 8849.
    posted on 2007-07-30 11:53 Derek.Guo 閱讀(9947) 評論(1)  編輯  收藏 所屬分類: Linux/Unix

    評論:
    # re: JProfiler遠程監控Tomcat[未登錄] 2009-09-30 09:56 | sun
    有沒有發生tomcat端口打不開的情況。  回復  更多評論
      
    MSN:envoydada@hotmail.com QQ:34935442
    主站蜘蛛池模板: 国产aⅴ无码专区亚洲av麻豆| 好爽…又高潮了免费毛片| 2022中文字字幕久亚洲| 杨幂最新免费特级毛片| 亚洲av麻豆aⅴ无码电影| 一级特黄录像免费播放中文版| 亚洲Aⅴ无码一区二区二三区软件| 美女扒开尿口给男人爽免费视频 | 色播亚洲视频在线观看| 69av免费观看| 国产精品亚洲综合久久| 日本xxwwxxww在线视频免费 | 亚洲va在线va天堂va四虎| 99视频免费播放| 亚洲综合色7777情网站777| 成全影视免费观看大全二| 在线观看亚洲免费| 亚洲色自偷自拍另类小说| 日本视频免费高清一本18| 亚洲国产成人久久三区| 免费看美女被靠到爽的视频| 一本到卡二卡三卡免费高| 亚洲av永久无码精品秋霞电影影院| 无码国产精品一区二区免费3p| 亚洲国产精品无码久久久| 日本xxwwxxww在线视频免费| 91免费福利视频| 亚洲国产中文在线视频| 国产精品免费电影| 久久久精品午夜免费不卡| 亚洲五月综合网色九月色| 亚洲av无码国产精品色在线看不卡 | 亚洲成在人线中文字幕| 日韩精品免费一区二区三区| 国内精品免费久久影院| 亚洲不卡1卡2卡三卡2021麻豆| 亚洲国产精品日韩| 100000免费啪啪18免进| 成人无码视频97免费| 亚洲性色AV日韩在线观看| 亚洲熟妇丰满多毛XXXX|