Jconsole 监控linux下的tomcat

第一、linux系统先安装jprofiler服务端

下载地址:http://download.csdn.net/detail/fanjeff/8962879
安装过程,回车或者按Y,一直下一步知道安装完成。
vi /etc/profile
在最后增加
JPROFILER_HOME=/opt/jprofiler8/bin/linux-x64(注意32和64位)
export LD_LIBRARY_PATH=$JPROFILER_HOME
第二、jprofiler连接tomcat
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). 这里会列出需要在服务器端做的配置:
(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. 把中间这句话复制下来。
第三、修改tomcat下的catalina.sh
把上一步复制的增加到变量JAVA_OPTS中
JAVA_OPTS="$JAVA_OPTS -agentpath:/opt/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849"
启动tomcat
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值