清馨

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

准备工作:

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操作。

posted on 2018-06-19 21:20  清馨  阅读(545)  评论(0编辑  收藏  举报