HP Diagnostic for TOMCAT (320 Views)
Reply
Frequent Advisor
WW618208
Posts: 59
Registered: ‎07-04-2011
Message 1 of 7 (320 Views)

HP Diagnostic for TOMCAT

Hi Team,

 

We are usning HP dauignostics 9.21 and planning to monitor a tomcat application. I did instrument and got theinstremeneted path.

Could any body tell me where to put these path in the start up script.

 

Thanks

Kamal

HP Expert
kenneth.gonzalez
Posts: 1,627
Registered: ‎04-28-2011
Message 2 of 7 (293 Views)

Re: HP Diagnostic for TOMCAT

Hi,

You need to put instrumentation params in catalina.bat/.sh. Follow instructions in Install & Config guide:

http://support.openview.hp.com/selfsolve/document/KM00229227

on page 187: Configuring Tomcat Server with a Startup Script
Kenneth Gonzalez
HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you haven’t tried it yet, come and join us in our entitled forums at Support Customer Forums
Trusted Contributor
bkserver
Posts: 233
Registered: ‎05-20-2013
Message 3 of 7 (278 Views)

Re: HP Diagnostic for TOMCAT

If Linux/got a server.env - you can simply add them there as JAVA_OPTS
HP Expert
KMadan
Posts: 1,079
Registered: ‎05-27-2009
Message 4 of 7 (268 Views)

Re: HP Diagnostic for TOMCAT

[ Edited ]

Instead of including it in the catalina.bat/sh, I would suggest to create a file with name setenv.bat/sh and add something similar to below.

set CATALINA_OPTS=-Xbootclasspath/p:C:\MercuryDiagnostics\JavaAgent\DiagnosticsAgent\classes\Oracle\1.7.0_40\instr.jre -javaagent:C:\MercuryDiagnostics\JavaAgent\DiagnosticsAgent\lib\probeagent.jar

 

Tomcat (Catalina.bat/sh) automatically calls this file when available inside the bin directory.

 

Using this way, we can avoid using launching the probe when shutdown.bat/sh is called.

 

Catalina.bat calls the setenv.bat only when starting the Tomcat Server.

 

Thanks!

Madan Kavarthapu


Madan
Frequent Advisor
WW618208
Posts: 59
Registered: ‎07-04-2011
Message 5 of 7 (258 Views)

Re: HP Diagnostic for TOMCAT

Hi Madan,

 

I have attached the catalina.txt. Could you help where to add the instrumsnted path.Is it below this line i need to add.

 

# Debugging Options
CATALINA_OPTS="$CATALINA_OPTS -Xloggc:/data/prdmvcawf-44340/apache-tomcat-7.0.41/logs/gc.log -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -

XX:HeapDumpPath=/data/prdmvcawf-44340/apache-tomcat-7.0.41/logs/ -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=44347 -

Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

-------------------

 

or do I need to add

 

#JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -server -Xmx4096m -Xms1024m -XX:MaxPermSize=1024m -XX:PermSize=512m -XX:+UseParallelGC"
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -server -Xmx8192m -Xms2048m -XX:MaxPermSize=2048m -XX:PermSize=512m -XX:+UseParallelGC"

JAVA_OPTS="$JAVA_OPTS -DgpsEnv=prod"

JAVA_OPTS="$JAVA_OPTS -DawafPropertiesLocation=/data/awafproperties"

 

Below this line.

 

One more thing you have mentined that in the I neeto set in the setenv.sh the instrumented path.So in my case will i use CATALINA_OPTS or JAVA_OPTS.

 

Please confirm.

 

Thanks

Kamal

Frequent Advisor
WW618208
Posts: 59
Registered: ‎07-04-2011
Message 6 of 7 (256 Views)

Re: HP Diagnostic for TOMCAT

Hi Madan,

 

Find the catalins file.

 

Thanks

Kamal

HP Expert
KMadan
Posts: 1,079
Registered: ‎05-27-2009
Message 7 of 7 (250 Views)

Re: HP Diagnostic for TOMCAT

I dont find any attachment. As I mentioned if you want to use setenv.bat, all you need to do is create a file with name setenv.bat (in Windows OS) and enter the below line in it.

set CATALINA_OPTS=-javaagent:C:\MercuryDiagnostics\JavaAgent\DiagnosticsAgent\lib\probeagent.jar

 

Change the Diagnostics parameter specific to your environment. Save it and place the file in the same location where Catalina.bat file exists. The Catalina.bat file will call the setenv.bat automatically during startup and pick this parameter and pass it to the java.


Madan
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.