jprofiler配置

第一步:安裝jprofiler window版,


第二步: 運行 jprofiler ,在菜單中選擇 Session->Integration Wizard->New Remote Integration

後面幾步就是傻瓜操作,jprofiler如果是監控tomcat,應該選擇要監控的tomcat的startup.bat,如:

D:/java/tomcat6/bin/debug-store.bat


第三步:配環境變量path:F:/Program Files/jprofiler6/bin/windows

 

第四步:添加啓動項

-agentlib:jprofilerti=port=8849,nowait,id=103,config=C:/Documents and Settings/Administrator/.jprofiler6/config.xml"

"-Xbootclasspath/a:F:/Program Files/jprofiler6/bin/agent.jar" -Xbootclasspath/a:F:/Program Files/jprofiler6/bin/agent.jar


第五步:配置bat文件


set CATALINA_HOME=D:/java/tomcat6
 
rem The following lines have been added by the
rem application server integration wizard of JProfiler
 
set CATALINA_OPTS=-agentpath:F:/usr/jprofilerti.dll=port=8849 %CATALINA_OPTS%
 
rem end of modifications
 
set CATALINA_BASE=D:/java/tomcat6/tomcat_store
set CATALINA_TMPDIR=D:/java/tomcat6/temp
set JAVA_HOME=d:/java/jdk/jdk1.6.0_10
set JPDA_ADDRESS=1498
set JPDA_TRANSPORT=dt_socket
set JAVA_OPTS=%JAVA_OPTS% -agentlib:jprofilerti=port=8849,nowait,config=F:/usr/config.xml -Xbootclasspath/a:F:/usr/agent.jar
catalina jpda run


注意:F:/usr/jprofilerti.dll  F:/usr/config.xml  F:/usr/agent.jar中間不能有空格,可以拷貝到一個文件下,再來配置


第六步:啓動tomcat,在等待監聽的時候啓動jprofiler的session

發佈了33 篇原創文章 · 獲贊 4 · 訪問量 15萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章