前提条件:
1.
服务器:Linux X64;tomcat 7.0;jdk 1.7;jprofiler_linux_9_2.sh
客户端:Windows10;jprofiler_windows-x64_9_2.exe
2.
3.
4.
把 jprofiler_linux_9_2.sh 上传到到服务器,假设路径为 /home/devweb/soft
# cd/home/devweb/soft
# chmod +x jprofiler_linux_9_2.sh
# ./ jprofiler_linux_9_2.sh -c
注意,这里的 -c 意思是用字符方式来安装,如果机器上没有X,则加上该参数
开始:
1,,首先window客户端和 linux服务端都要安装相同版本的 jprofile;
2, 在tomcat的 catalina.sh 添加以下启动jprofile配置项
JAVA_OPTS="-agentpath:/opt/jprofiler9/bin/linux-x64/libjprofilerti.so=port=9988"
(最后面9988是jprofile客户端要连接的监控通讯端口)
3,启动tomcat,会提示等待jprofile客户端连接;
4,打开window上安装的 jprofile 客户端,Session->Integration Wizard->New Remote Integratation 配置远程服务器的ip地址 和 tomcat里面配置好的端口