`
eminem
  • 浏览: 136573 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Jprofiler 安装

阅读更多
2008-02-14 11:22WEB服务总是莫名其妙的运行一段时间后JVM直接OutOfMemory错误,这个问题一直困扰着程序的正常运行。大概半个月时间一次,上网查了些资料,也做了不少优化,什么weblogic环境变量Xms,Xmx,MaxPermSize参数调整,可问题依旧,况且这也是治标不治本,问题也许发生在程序中,可能存在内存泄露,或spring和hibernate框架相关的问题。

在网上找到个大家说很好的工具叫Jprofiler,学着弄弄,down下来个最新版本。软件需要注册,注册后有十天的试用期。现在把安装过程记下来。

由于我要监控的程序是在远程的linux系统下的weblogic服务,所以这里记录的是远程监控的配置过程。

先介绍下环境:

系统服务器:

操作系统:linux redhat

web服务器:weblogic 8.1

java虚拟机版本:1.4.2

jprofiler版本:jprofiler_linux_5_1_2.tar.gz(安装包共三个版本 sh,exe,tar.gz)

客户端:

操作系统:Windows Xp SP2

jprofiler5.1.2 for windows(安装包:jprofiler_windows_5_1_2.zip)

安装:

一.客户端安装:
1 windows下直接解压zip包,运行jprofiler5.1.2的exe安装即可。
2 运行jprofiler并进行配置
1)Quick Start:
       选择 An application on a remote computer
       ->Next
2)Local or remote:
       The profiled application s located 选择 On a remote computer,
      Platform of the remote computer 下拉菜单选择“Linux X86/AMD64”
      ->Next
3)Remote address :填写被监控应用程序所在远程计算机的IP
4)Installation directory:解压路径:/var/jprofiler5
5) choose JVM :
     JVM Vendor: Sun jvm提供商
    Version:1.4.2 版本
     Mode:hotspot 系统默认
6)jprofile port :8849
7)startup mode:
      Wait for ……   为了在开发环境中获取监控的信息,它将等待远程计算机上的Jprofile GUI 启动,并和本机建立连接,这种方式比较便于修改jprofiler的配置信息。
        Don't wait for …… 不必等待远程计算机的Jprofile GUI 先启动和建立连接,立即启动。但在启动远程应用程序前必须校验当前所配置会话的配置文件。虚拟机参数将参考Jprofile 的config 文件的路径。
这里选择Don't wait for ……
      ->Next
8) Config synchronization:
      Directory for config file in the remote computer:/opt (远程config文件的路径)
      同步方式:
    Manual synchronization;copy to diretory;execute command:
      提供三种同步方式,这里我选择的是第一个手工同步。
     ->Next
9)Perform modifications:
     Integration type: [Generic application]
     Selected JVM: Sun 1.4.2 (hotspot)
    Startup mode: Don't wait for JProfiler GUI, startup immediately

     Important: The local config file C:\Documents and Settings\Jan\.jprofiler5\config.xml must be copied manually to /opt on the remote computer when the profiling settings are changed.


    (1) Please insert

         -Xrunjprofiler:port=8849,nowait,id=115,config=/opt/config.xml -Xbootclasspath/a:/var/jprofiler5/bin/agent.jar

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

     (2) Please add

         /var/jprofiler5/bin/linux-x86

     to the environment variable LD_LIBRARY_PATH.

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

      这里的黑体文字部分要保存下来,在服务器端安装时会用到。
      ->Next
   10) Finished:
        选No,I will start the session later
      因为我们还没有配置服务器端。

二.服务器端安装
1 将jprofiler_linux_5_1_2.tar.gz上传到服务器上,/var/下建立jprofiler5目录,并将程序解压到/opt/jprofiler5下即可
2 修改用户环境变量.bash_profile。
    加入export LD_LIBRARY_PATH=/var/jprofiler5/bin/linux-x86。如果是 64 位服务器,则选择linux-x64。
    运行source .bash_profile 使环境变量立即生效
3 添加weblogic启动参数
    将一.9).(1)中黑体的部分加到weblogic的启动文件startWebLogic.sh的参数中如:
    ${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} -verbosegc
    -Xrunjprofiler:port=8849,nowait,id=115,config=/opt/config.xml -Xbootclasspath/a:/var/jprofiler5/bin/agent.jar
    -Dweblogic.Name=${SERVER_NAME} -Dweblogic.ProductionModeEnabled=${PRODUCTION_MODE} -Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" weblogic.Server
    尽量让它在一行中。
4 把 C:\Documents and Settings\Jan\.jprofiler5\ 下的config.xml上传到服务器上,路径为一.8)中配置的Directory for config file in the remote computer:/opt
    因为这里选择的同步方式是Manual synchronization,所以以后配置发生改变时,需要手工再次上传新的config.xml到这个路径。
三.启动weblogic服务:

**************************************************
* To start WebLogic Server, use a username and   *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://[hostname]:[port]/console    *
***************************************************
JProfiler> Protocol version 25
JProfiler> Using JVMPI
JProfiler> 32-bit library
JProfiler> Don't wait for frontend to connect.
JProfiler> Using config file /opt/config.xml (id: 114)
JProfiler> Listening on port: 8849.
[Full GC 114K->84K(520256K), 0.0063330 secs]
JProfiler> Native library initialized
JProfiler> If output stops here, please remove -Xdebug from the command line
JProfiler> Using dynamic instrumentation
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
JProfiler> Hotspot compiler enabled
JProfiler> Starting weblogic/Server ...

<Feb 5, 2008 11:41:31 AM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_09-b05 from Sun Microsystems Inc.>
<Feb 5, 2008 11:41:31 AM CST> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>





版本jprofiler5_0

Server两台 TOMCAT | WEBLOIGC



一.Linux

1.安装

# ./jprofiler_linux_5_0.sh -q

1.配置环境

export LD_LIBRARY_PATH=/opt/jprofiler5/bin/linux-x64

3.配置

a)TOMCAT

修改bin/catalina.sh # ----- Execute The Requested Command -----------------------------------------
JAVA_OPTS="-servezhdr -Xmx768m -Xms512m -XX:MaxNewSize=256m -XX:MaxPermSize=512m -Djava.awt.headless=true
将下面补充到已有的JAVA_OPTS后,保持在一行中
-agentlib:jprofilerti=port=8849,nowait,id=104,config=/opt/config.xml -Xbootclasspath/a:/opt/jprofiler5/bin/agent.jar

config.xml文件放到/opt目录下,修改其中SESSION标签IP地址内容

重启TOMCAT
配置后tomcat会出现无法shutdown,可以通过kill进程杀掉,然后重启即可.


b)WEBLOGIC

修改bin/setDomainEnv.sh

JAVA_OPTIONS="${JAVA_OPTIONS} ${JAVA_PROPERTIES} -Dwlw.iterativeDev=${iterativeDevFlag} -Dwlw.testConsole=${testConsoleFlag} -Dwlw.logErrorsToConsole=${logErrorsToConsoleFlag}"
将下面补充到已有的JAVA_OPTS后,保持在一行中
-agentlib:jprofilerti=port=8849,nowait,id=104,config=/opt/config.xml -Xbootclasspath/a:/opt/jprofiler5/bin/agent.jar


config.xml文件放到/opt目录下,修改其中SESSION标签IP地址内容

重启WEBLOGIC
配置后weblogic会出现无法shutdown,可以通过kill进程杀掉,然后重启即可.



二.Windows安装

注册码可到官方网站注册即可获得(10 days).

http://www.ej-technologies.com



分享到:
评论

相关推荐

    JProfiler安装及使用

    JProfiler安装及使用,windows 及Linux 的安装及操作

    jprofiler安装使用

    jprofiler是一个好用的JVM性能监控工具,本文档包括了其在Windows、LINUX下的安装、使用说明。

    Jprofiler安装部署启动.pdf

    Jprofiler安装部署启动.pdf

    JProfiler安装、配置、实战

    JProfiler7.2.2或7.2.3版本安装、配置、实战

    Linux Jprofiler 安装

    jprofiler 在linux下安装并使用资料收集

    JProfiler安装文档(windows连接linux64)

    JProfiler直觉式的GUI让你可以找到效能瓶颈、抓出内存漏失(memory leaks)、并解决执行绪的问题。它让你得以对heap walker作资源回收器的root analysis,可以轻易找出内存漏失;heap快照(snapshot)模式让未被参照...

    jprofiler安装文件

    java 软件分析工具 安装包java 软件分析工具 安装包java 软件分析工具 安装包java 软件分析工具 安装包java 软件分析工具 安装包

    jprofiler详细使用介绍

    详细介绍jprofiler安装过程和安装过程会出现的问题以及教你如何获得注册码。安装成功后教你如何使用工具,例如什么情况下表示内存溢出,什么情况下进程死锁,这个工具主要是看那些使用标签。

    JProfiler安装程序

    1、在linux系统解包jprofiler 2、修改对应tomcat的catalina.sh文件 3、在Windows端,安装jprofiler 4、new session,写上linux服务器的ip地址即可 此包是windows下的安装+破解包。

    JProfiler 6.0.3

    JProfiler是一个全功能的Java剖析工具(profiler),专用于分析J2SE和J2EE应用程序。...1 下载Jprofiler安装文件并安装 http://www.ej-technologies.com/download/jprofiler/files.php 2 下载破解文件

    jprofiler安装文档

    近期现场经常出现java内存溢出问题,由于不能实时发现当时java进程占用内存的情况,研发也不好及时定位问题,导致该问题一直不能很好的解决,找到一款比较好的内存监控软件jprofiler软件,该软件可以实时监控指定...

    JProfiler 6 破解版

    JProfiler是一个全功能的Java剖析工具...a)请先到官网下载Jprofiler安装文件 http://www.ej-technologies.com/download/jprofiler/files.php 目前最新版为6.1.1 b)然后在本站下载破解文件(一个可用的license key)。

    Jprofiler 6-11破解keygen.zip

    Jprofiler安装程序可从官网下载https://www.ej-technologies.com/products/jprofiler/overview.html 附件为破解工具,keygen.exe

    JProfiler的安装及使用

    这是自己做的PPT,详细介绍了JProfiler的安装及使用!

    jprofiler8安装包+注册码

    jprofiler8安装包+注册码 可用

    JProfiler在Linux上的安装和使用

    JProfiler在Linux上的安装和使用

    jprofiler_linux_4_3_2.tar.gz 和 JProfiler在Linux上的安装和使用.rar

    jprofiler_linux_4_3_2.tar.gz 和 JProfiler在Linux上的安装和使用.rar

    jprofiler4.32安装破解文件+jprofiler4.32使用教程

    jprofiler的功能,相信找这个资源的人一定知道了,我就不说了,主要告诉大家这些资料是找了好久才集合在一起的.方便学习的人一次下载使用.也能节省点时间.希望对大家有帮助.

Global site tag (gtag.js) - Google Analytics