Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Monitoring Tomcat application
Monitoring Tomcat application [message #37151] Mon, 24 October 2005 07:26 Go to next message
Eclipse UserFriend
Originally posted by: achoain.capgemini.fr

Hi all, I have a little problem. When I tried to monitor a tomcat J2EE web
application, I use java application and it need a main class like you konw.
What do I have to do to monitor this type of application?
thanks
Re: Monitoring Tomcat application [message #38282 is a reply to message #37151] Mon, 31 October 2005 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Navid_Mehregani_nmehrega.ca.ibm.com

This is a multipart message in MIME format.
--=_alternative 00524B2D852570AB_=
Content-Type: text/plain; charset="US-ASCII"

You're trying to profile your application in 'launch' mode. Try attaching
to it instead by running your Tomcat server with the following VM
argument: -XrunpiAgent:server=enabled. Make sure that the Agent
Controller has started before running your Tomcat server. After starting
the server, create a new 'attach -java process' launch configuration by
clicking on the profile button -> 'profile..', select 'localhost' in the
host list, switch to the agent tab and select your agent, select the
profiling tab and make sure you set the appropriate filters in your
profiling set, click on profile to start profiling. Let me know if you
need more help.

** Due to the numerous questions posted on the newsgroup about using TPTP
to profile J2EE applications, I'm going to open a new enhancement for
creating a doc that explains how this can be done. **

Navid Mehregani
IBM Canada
--=_alternative 00524B2D852570AB_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">You're trying to profile your application
in 'launch' mode. &nbsp;Try attaching to it instead by running your Tomcat
server with the following VM argument: -XrunpiAgent:server=enabled. &nbsp;Make
sure that the Agent Controller has started before running your Tomcat server.
&nbsp;After starting the server, create a new 'attach -java process' launch
configuration by clicking on the profile button -&gt; 'profile..', select
'localhost' in the host list, switch to the agent tab and select your agent,
select the profiling tab and make sure you set the appropriate filters
in your profiling set, click on profile to start profiling. &nbsp;Let me
know if you need more help.</font>
<br>
<br><font size=2 face="sans-serif">** Due to the numerous questions posted
on the newsgroup about using TPTP to profile J2EE applications, I'm going
to open a new enhancement for creating a doc that explains how this can
be done. **</font>
<br>
<br><font size=2 face="sans-serif">Navid Mehregani</font>
<br><font size=2 face="sans-serif">IBM Canada</font>
--=_alternative 00524B2D852570AB_=--
Re: Monitoring Tomcat application [message #38382 is a reply to message #38282] Mon, 31 October 2005 23:38 Go to previous messageGo to next message
Hendra Suwanda is currently offline Hendra SuwandaFriend
Messages: 1
Registered: July 2009
Junior Member
Just a few comments on Profiling Tomcat applications such as servlets:

- You need to edit the catalina.bat (on Windows). Find the lines with
%_EXECJAVA%. Add the -XrunpiAgent:server=enabled option on the lines as
Navid suggested. Here is an example from my catalina.bat:
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" -XrunpiAgent %MAINCLASS%
%CMD_LINE_ARGS% %ACTION%
If you execute catalina.bat, Tomcat will be started with profiling enabled.

- Make sure the <RAC_install>\bin is on your path, otherwise the
piAgegent.dll will not be found. See the "Getting Started" html
document on the RAC install directory.

- Now you can attach to Tomcat using TPTP workbench as usual.

- Make sure you create the appropriate filtering. Otherwise you will
get too many profiling information on classes you may not be interested.
I am usually interested in my servlet classes and filter out the rest.
Re: Monitoring Tomcat application [message #47969 is a reply to message #38382] Thu, 22 December 2005 15:38 Go to previous message
Eclipse UserFriend
Originally posted by: duvelbier-tsmets.yahoo.com

I was just wondering with which JDK's version this option
(-XrunpiAgent:server=enabled) is compatible. AMOF doing 'java -X' on a JDK
1.4.2 & 1.5.0_02, I get nothing refering to that option.


\T,

--
Typpically, I get smthg like this
C:\>java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)

C:\>java -X
-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:<directories and zip/jar files separated by ;>
set search path for bootstrap classes and resources
-Xbootclasspath/a:<directories and zip/jar files separated by ;>
append to end of bootstrap class path
-Xbootclasspath/p:<directories and zip/jar files separated by ;>
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc:<file> log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs reduce use of OS signals by Java/VM (see
documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.
Previous Topic:Does tptp have true statistical information gathering?
Next Topic:Java 5.0 support?
Goto Forum:
  


Current Time: Tue Apr 23 08:59:53 GMT 2024

Powered by FUDForum. Page generated in 0.03871 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top