Saturday, May 01, 2010

Jboss Profiler 2.0 - Coo!!!

Got myself into a tough situation of Memory profiling a web application. I had a custom written profiler which does cool on measuring the time consumption, but not the memory. Since most of the profilers are commercial, tried my hands on "JBoss Profiler 2.0", Wow!!! never seen a profiler work in just 3-4 steps :), don't believe me try it yourself,

Steps:
1.Download "JBoss Profiler 2.0" - http://labs.jboss.com/jbossprofiler/downloads.html
2.Copy files to your Jboss,
  • jboss-profiler.jar -> jboss/bin
  • jboss-profiler.properties (Add packages to be instrumented in includes) -> jboss/bin
  • javassist.jar -> Jboss/bin
  • jboss-profiler.sar -> jbossas/server/(default)/deploy
3.Add the following to your run.conf or run.bat JAVA_OPTS,
-javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties

4.Start the Server, Use the Client program to collect the statistics,
java -Xmx512m -Djboss-profiler-client.properties=jboss-profiler-client.properties -jar jboss-profiler-client.jar -h(server-host) -P(server-port) snapshot

Reference:
1.Excellent User Guide comes with the download, it has everything you needed to know.

Checkout In Dzone

No comments: