Saturday, June 18, 2011

Setting up Eclipse TPTP for performance monitoring of Jetty run from Maven

This is a document to help you setup Eclipse TPTP plugin for performance monitoring of J2EE application deployed to Jetty using the jetty-maven-plugin.

Open MyEclipse Configuration center and search for TPTP, download the newest version of TPTP plugin, restart your IDE after the install finishes.

Next go to the TPTP homepage and download the Agent controller for your architecture (I downloaded windows IA32).

Extract the Agent controller zip to C:\Tools\agntctrl.win_ia32-TPTP-4.7.2

Edit your system environment variables and add

RASERVER_HOME=C:\Tools\agntctrl.win_ia32-TPTP-4.7.2 PATH=C:\Tools\agntctrl.win_ia32-TPTP-4.7.2\bin;%PATH%  Open a command prompt and goto agent controller cd C:\Tools\agntctrl.win_ia32-TPTP-4.7.2\bin SetConfig.bat 

This should display the following:

C:\Tools\agntctrl.win_ia32-TPTP-4.7.2\bin>SetConfig.bat Specify the fully qualified path of "javaw.exe" (e.g. c:\jdk1.4\jre\bin\javaw.ex e):   Default>"C:\Program Files\IBM\WebSphere\AppServer\java\jre\bin\javaw.exe" (Pre ss  to accept the default value)   New value> Network access mode (ALL=allow any host, LOCAL=allow only this host, CUSTOM=list  of hosts):   Default>"LOCAL" (Press  to accept the default value)   New value>ALL Security enabled. (true/false):   Default>"FALSE" (Press  to accept the default value)   New value> 

Start the Agent Controller by launching a command console window with Administrator privledges (Run as Admni..) The change your working directory to

cd C:\Tools\agntctrl.win_ia32-TPTP-4.7.2\bin
ACServer.exe

See this link for more agent controller info http://dev.eclipse.org/viewcvs/viewvc.cgi/platform/org.eclipse.tptp.platform.agentcontroller/src-native-new/packaging_md/windows/getting_started.html?root=TPTP_Project&view=co

This is also a link with good info on TPTP http://eclipse.sys-con.com/node/508048?page=0,2

Configure piAgent and start your application with Maven by adding this to MAVEN_OPTS environment variable:

-XrunpiAgent:server=enabled 

From eclipse navigate to Run | Profile Configurations... | Attach to Agent | New

ACServer should be running on localhost port 10002, check this with netstat -a -b -n command or test button in eclipse

Jetty JVM Agent should be detected on the Agent tab. select ONLY ONE of the profile probes, CPU --or-- MEMORY etc.. do NOT select more than one, treat them as mutually exclusive radio buttons rather than check boxes.

You can then perform tasks in your application and save the data captured. Also you can create new reports from the captured data with TPTP eclipse tools.

See http://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html

No comments:

About Me

My photo
Lead Java Developer Husband and Father

Tags