一、jprofiler8下載安裝:
1、下載:jbox上
略
2、安裝:
①windows版安裝
(略)
序列號:
[email protected]#23874-hrwpdp1sh1wrn#0620
[email protected]#36573-fdkscp15axjj6#25257
[email protected]#5481-ucjn4a16rvd98#6038
[email protected]#99016-hli5ay1ylizjj#27215
[email protected]#40775-3wle0g1uin5c1#0674
[email protected]#7009-14frku31ynzpfr#20176
[email protected]#49604-1jfe58we9gyb6#5814
[email protected]#25531-1qcev4yintqkj#23927
[email protected]#96496-1qsu1lb1jz7g8w#23479
[email protected]#20948-11amlvg181cw0p#171159
②linux配置:
解壓安裝文件,複製到指定目錄下;
在/etc/profile中添加
export JPROFILER_HOME=/export/zhangjf/jprofiler8
exportLD_LIBRARY_PATH=$JPROFILER_HOME/bin/linux-x86
其中,JPROFILER_HOME配置的爲你實際安裝目錄;64位系統配置linux-x86
二、windows下遠程配置
1、選擇遠程集成
2、選擇遠程系統
3、選在jvm版本
4、選擇等待、啓動方式
5、輸入遠程服務器IP
6、輸入遠程服務器上jprofiler的絕對路徑
7、輸入監聽端口:我選擇默認端口
8、生成監聽參數(複製出黑體部分 -agentpath部分)
9、完成
三、服務器端啓動
1、main方式啓動:
把上述第8步中的監控參數,加入到main方式啓動參數中啓動。例如:
原:java -classpath ../conf/:../lib/*com.jd.test.saf2x.ServerMain 21 &
添加後:java -classpath ../conf/:../lib/*-agentpath:/export/zhangjf/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849,nowait com.jd.test.saf2x.ServerMain 21&
這樣在啓動服務時,就啓動jprofiler監控用於分析。
2、tomcat方式啓動:
在startup.sh中的CATALINA_OPTS中增加上述的監控參數。如下:
加入前:
…………
exec"$PRGDIR"/"$EXECUTABLE" start "$@"
加入後:
…………
CATALINA_OPTS="-agentpath:/export/zhangjf/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849,nowait $CATALINA_OPTS"
export CATALINA_OPTS
exec"$PRGDIR"/"$EXECUTABLE" start "$@"
這樣在啓動tomcat時,就啓動jprofiler監控用於分析。
四、客戶端查看
啓動查看:
查看監控分析頁面: