首页 > 其他 > 详细

【监控】Jprofiler监控tomcat的配置方法及报错解决过程

时间:2018-06-19 21:57:38      阅读:388      评论:0      收藏:0      [点我收藏+]

准备工作:

1.Jprofiler for Linux安装包一个(服务端)

2.Jprofiler for windows安装包一个(客户端)

3.各自安装、解压

Linux:/opt/jprofiler7

配置过程:

1.打开客户端jprofiler,关掉向导

2.如图

技术分享图片

(1)选择远程服务器系统

技术分享图片

(2)此处填写服务器的ip地址

技术分享图片

(3)此处填写服务器jprofiler的安装目录

技术分享图片

(4)此处填写监听端口

技术分享图片

(5)此时将以下内容添加进服务器tomcat的bin目录下catalina.sh

-agentpath:/opt/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849

技术分享图片

技术分享图片

注:如在catalina.sh文件里没有找到上面代码的位置,可以添加到一下位置试试

技术分享图片

 

CATALINA_OPTS="$CATALINA_OPTS -agentpath:/opt/jprofiler7/bin/linux-x86/技术分享图片libjprofilerti.so=port=8849"

(6)然后重启tomcat

此时报错:

Could not find agent library /opt/jprofiler7/bin/linux-x64/libjprofilerti.so in absolute path, with error: /opt/jprofiler7/bin/linux-x64/libjprofilerti.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)

原因:找不到对应目录下的libjprofilerti.so

解决:将配置中的路径中的Linux-x64改为Linux-x86

技术分享图片

然后启动tomcat同时监控日志

(7)日志显示:

技术分享图片

(8)客户端jprofiler继续

技术分享图片

(9)监控页面

技术分享图片

 

备注:未特别提及之处均默认next操作。

【监控】Jprofiler监控tomcat的配置方法及报错解决过程

原文:https://www.cnblogs.com/chuxinxin/p/9201156.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!