您的位置:首页 > 运维架构 > Linux

Windows客户端的JProfiler远程监控Linux上的Glassfish ( by quqi99)

2010-01-21 18:40 477 查看
Windows客户端的JProfiler远程监控Linux上的Glassfish ( by quqi99)



作者:张华 发表于:2010-01-21

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明



1) windows与linux上都要安装jprofile,且版本一致。

chmod 777 jprofiler.sh

./jprofiler -c 字符界面安装

2)linux端配置

在glassfish的asadmin启动脚本中添加:



JPROFILER_HOME
=/
opt
/
jprofiler4
/
bin
/
linux
-
x86

export LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH:$JPROFILER_HOME



在domain.xml中添加:

<java-config

<profiler enabled="true" name="JProfiler">

<jvm-options>-agentlib:jprofilerti=port=8849</jvm-options>

<jvm-options>-Xbootclasspath/a:/opt/jprofiler4/bin/agent.jar</jvm-options>

</profiler>

也就是加一个JVM选项,如果是TOMCAT你可以这样:

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

3) windows端配置:


运行 JProfiler 。第一次打开会有向导,忽略它。

选择 Session->Integration Wizard->New Remote Integratation

选择 On a remote computer;Platform of remote computer 选择 Linux x86/AMD 64;Next

4) 启动时

在windows上运行 asadmin命令之后,然后再windows上启动客户端连接:

点击jprofiler菜单 session>start center>Open Session

Available session configurations中列出了刚才配置的连接,选中使用就OK了!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: