`

linux配置jprofiler

 
阅读更多

服务器环境: CentOS 5.5final , WebLogic : 10.3 (weblogic自带的jdk是1.6.04)
客户端环境: Windows XP SP3 ,SUN JDK1.6.05

jprofiler7支持的平台有:

aix-ppc

aix-ppc64

freebsd-x64

freebsd-x86

hpux-ia64n

hpux-ia64w

hpux-parisc

hpux-parisc64

linux-arm

linux-ppc

linux-ppc64

linux-x64

linux-x86

macos

solaris-sparc

solaris-sparcv9

solaris-x64

solaris-x86

windows

windows-x64

 

监控方式介绍:

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启动脚本;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics