1、jprofiler8下載安裝:java
1、下載:jbox上linux
略windows
2、安裝:tomcat
①windows版安裝服務器
(略)jvm
序列號: ide
L-Larry_Lau@163.com#23874-hrwpdp1sh1wrn#0620
L-Larry_Lau@163.com#36573-fdkscp15axjj6#25257
L-Larry_Lau@163.com#5481-ucjn4a16rvd98#6038
L-Larry_Lau@163.com#99016-hli5ay1ylizjj#27215
L-Larry_Lau@163.com#40775-3wle0g1uin5c1#0674
L-Larry_Lau@163.com#7009-14frku31ynzpfr#20176
L-Larry_Lau@163.com#49604-1jfe58we9gyb6#5814
L-Larry_Lau@163.com#25531-1qcev4yintqkj#23927
L-Larry_Lau@163.com#96496-1qsu1lb1jz7g8w#23479
L-Larry_Lau@163.com#20948-11amlvg181cw0p#171159ui
②linux配置:spa
解壓安裝文件,複製到指定目錄下;3d
在/etc/profile中添加
export JPROFILER_HOME=/export/zhangjf/jprofiler8
exportLD_LIBRARY_PATH=$JPROFILER_HOME/bin/linux-x86
其中,JPROFILER_HOME配置的爲你實際安裝目錄;64位系統配置linux-x86
2、windows下遠程配置
1、選擇遠程集成
2、選擇遠程系統
3、選在jvm版本
4、選擇等待、啓動方式
5、輸入遠程服務器IP
6、輸入遠程服務器上jprofiler的絕對路徑
7、輸入監聽端口:我選擇默認端口
8、生成監聽參數(複製出黑體部分 -agentpath部分)
9、完成
3、服務器端啓動
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監控用於分析。
4、客戶端查看
啓動查看:
查看監控分析頁面: