安装官方地址:https://www.ej-technologies.com/download/jprofiler/files
注意:

1.Jprofiler for Linux安装包(服务端)不需要证书

2.Jprofiler for windows安装包/mac安装包(客户端) 需要购买证书试用10天

3.保证版本一致

一、安装和配置

1、windows/mac上安装jprofile

2、打开jprofile

3、Session -- Integration Wizard(综合向导)--new remote Integration(新远程集成)

4、选择on a remote computer --操作系统类型

5、JVM Vendor选择OracleVersion选择1.8.0,Mode选择默认,如果JVM64,需要勾选64-bit JVM

6、选择等待jprofiler gui 方式:

6.1 wait for a connecttion from the jprofiler gui 等待来自jprofiler gui的连接

6.2 startup immediately , connect later with the jprofiler gui 立即启动,稍后使用jprofiler

7、remote address配置 配置远程服务器IP

8、远程jprofiler的安装路径配置此时等待服务器安装jprofiler并告知路径

9、切换到服务器安装linux版本的jprofiler 把压缩包解压即可安装完毕

10、默认端口号配置

11、把界面中出现的-agentpath:/apps/software/jprofiler11.1.4/bin/linux-x64/libjprofilerti.so=port=8849配置到服务器tomcat安装目录/bin/bin/catalina.sh下,如下图

 JProfiler 性能分析工具介绍

12、重启tomcat服务器此时日志中出现如下及是在等待mac端的jprofiler继续操作

 JProfiler 性能分析工具介绍

13、回到mac端的jprofiler界面点击继续一直根据操作完成即配置完毕

JProfiler 性能分析工具介绍

 

 二、配置远程服务的方式进行配置

步骤一

JProfiler 性能分析工具介绍

选择web容器类型和版本

 JProfiler 性能分析工具介绍

JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

1、先从服务器上拷贝 tomcat下的startup.sh到本地

2、通过上面界面的浏览文件夹按钮浏览进来

3、点击下一步

 JProfiler 性能分析工具介绍

 JProfiler 性能分析工具介绍

 此时点击下一步会生成 startup_jprofiler.sh文件

此时把startup_jprofiler.sh 放置到服务器tomcat/bin目录下用chmod加上执行权限后用此文件执行启动tomcat不用startup.sh

 JProfiler 性能分析工具介绍

此时在客户端界面点击继续操作完成即可

 

三、作用:离线分析数据

有时候线上环境不允许直接连上去,我们可以把线上环境jvm的堆dump下来,在本地用jprofiler分析

1、可以直接用jdk自带的jmap获得快照jmap -dump:live,format=b,file=<filename> <PID>filename必须是后缀名是HPROF因为jprofiler能识别

 JProfiler 性能分析工具介绍

把res.hprof下载到本地然后通过 start center 如下图

 JProfiler 性能分析工具介绍

2推荐直接使用jprofilerbin目录下的jpdump命令行工具,可以选择dumpjvm

JProfiler 性能分析工具介绍

 

相关文章:

  • 2022-01-13
  • 2022-01-19
  • 2021-05-31
  • 2021-05-01
  • 2022-12-23
  • 2021-11-17
  • 2021-12-18
猜你喜欢
  • 2021-06-22
  • 2021-07-19
  • 2022-12-23
  • 2021-04-09
  • 2021-10-14
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案