This guide details how to install the Perfmon4j agent into an Tomcat 6.0.x application server under running on Windows. The instructions require perfomn4j 1.2.0-RC_2 or later.
Copy the following files from your perfmon4j distribution:
- Create an apache-tomcat/lib/endorsed folder.
- Copy the perfmon4.jar file into apache-tomcat/lib/endorsed folder.
- Copy the javassist.jar file into apache-tomcat/lib/endorsed folder.
- Copy the perfmon4-servlet.jar file into apache-tomcat/lib folder.
- Copy the perfmon4-tomcat55.jar file into apache-tomcat/lib folder.
- Copy the perfmonconfig.xml (located in the pefmon4j/doc folder of the perfmon4j distribution) file into apache-tomcat/conf folder.
Set the following environment variable:
- export CATALINA_OPTS="-javaagent:../lib/endorsed/perfmon4j.jar=-eorg.apache,-eSQL,-eVALVE,-f../conf/perfmonconfig.xml"
- export JAVA_ENDORSED_DIRS="-Djava.endorsed.dirs=../lib/endorsed"
- Start tomcat using apache-tomcat/bin/catalina.sh run shell script.
- You should see Perfmon4j ascii art when the agent is launched.
- Once the server is started you should see something that looks like the following:
Max Active Threads. 0 Throughput......... 0.00 per minute Average Duration... 0.00 Median Duration.... NA > 2 seconds........ 0.00% > 5 seconds........ 0.00% > 10 seconds....... 0.00% Standard Deviation. 0.00 Max Duration....... 0 Min Duration....... 0 Total Hits......... 0 Total Completions.. 0 (SQL)Avg. Duration. 0.00 (SQL)Std. Dev...... 0.00 (SQL)Max Duration.. 0 (SQL)Min Duration.. 0
This indicates that perfmon4j is monitoring each web request. Go into the apache-tomcat console http://localhost:8080 and navigate through the demo applications. Each minute a summary will be displayed showing this throughput information.