学历代表过去、能力代表现在、学习力代表未来
Jprofiler远程监控resin4.0
上一篇 /
下一篇 2012-05-15 17:16:53
/ 个人分类:性能监控
1.到官网下载linux安装包,如:jprofiler_linux_6_2_4.rpm
2.上传该安装包到linxu服务器上/opt目录下,重命名: mv jprofiler_linux_6_2_4.rpm jprofiler6.rmp
(重命名步骤为可选操作,是为了安装时能生成简单的文件目录 jprofiler6)
3.安装: rpm -ivh jprofiler_linux_6_2_4.rpm
4.安装完毕后,在etc/profile中添加:
#Jprofiler Conf
JPROFILER_HOME=/opt/jprofiler6/bin/linux-x64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JPROFILER_HOME
5.resin设置:进入/conf/resin.xml中,添加如下信息:
在<class-loader>..</class-loader>中加入
<tree-loader path="/usr/local/jprofiler6/lib" />
<tree-loader path="/usr/local/jprofiler6/bin" />
在<server-default>...</server-default>中加入
<jvm-arg>-agentpath:/opt/jprofiler6/bin/linux-x64/libjprofilerti.so=port=8849,nowait</jvm-arg>
6.重启resin,在resin日志中可以看到:
JProfiler> Protocol version 32
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 64-bit library
JProfiler> Don't wait for frontend to connect.
JProfiler> Starting up without initial configuration.
JProfiler> Listening on port: 8849.
JProfiler> Instrumenting native methods.
JProfiler> Can retransform. classes.
JProfiler> Can retransform. any class.
JProfiler> Native library initialized
JProfiler> VM initialized
JProfiler> Hotspot compiler enabled
...
7.在本地PC上安装对应版本的Jprofiler客户端,设置连接即可
备注:resin4.x和resin3.x以前的版本相比,resin4.x没有resin.conf文件,可直接在resin.xml中配置
步骤6中:如果resin.xml文件中没有<class-loader>..</class-loader>和<server-default>...</server-default>,可在<cluster>...</cluster>中手动添加
收藏
举报
TAG: