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 對性能影響過大, 不建議使用。

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