Jprofiler的使用

Jprofiler是一款优秀的Java性能检测工具,下面是JProfiler连接远程JVM的方法。

准备

首先在远程机器上下载Jprofiler并解压文档:

wget http://download-keycdn.ej-technologies.com/jprofiler/jprofiler_linux_9_1_1.tar.gz
tar -zxvf jprofiler_linux_9_1_1.tar.gz

使用jpenable启动JProfiler

[username@hostname ~]$ cd jprofiler9
[username@hostname jprofiler9]$ bin/jpenable
Select a JVM:
/opt/company/apps/server/jetty/sta...ini.new_service [10823] [1]
org.eclipse.jetty.xml.XmlConfigura...ork/jetty-conf/jetty8.xml [10837] [2]
1
Please select the profiling mode:
GUI mode (attach with JProfiler GUI) [1, Enter]
Offline mode (use config file to set profiling settings) [2]
1
Please enter a profiling port
[31757]
8419
You can now use the JProfiler GUI to connect on port 8419

jprofiler客户端安装

Mac 环境, 直接下载: http://download-keycdn.ej-technologies.com/jprofiler/jprofiler_macos_9_1_1.dmg

运行: Start Center -> Quick Attach -> On Another Computer, 选择IP, Port.

注意: JProfiler 诊断期间, 会引起服务性能降低。另外, Profiling Setting 有两个设置: 建议使用 Sampling,Instrumentation 对性能影响过大, 不建议使用。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章