Sr. Software Architect, Passionate about Open source Tools & Technologies. Expert in Enterprise Web Application Development using Java/J2ee Platform. Worked significantly on Enterprise Data Grid, Transactional Data Management, B2B Integration and Performance & Code Instrumentation. Senthil has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

JBoss Profiler 2.0

05.12.2010
| 12962 views |
  • submit to reddit
I recently got myself into a tough situation where I needed to do some memory profiling a web application. I had a custom written profiler which does ok on measuring the time consumption, but not the memory. Since most of the profilers are commercial, I tried out JBoss Profiler 2.0, Wow! I have never seen a profiler work in just 3-4 steps. If you 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(host) -P(port) snapshot

Reference:
1.An excellent User Guide comes with the download, it has everything you need to know.
0
Your rating: None
Published at DZone with permission of its author, Senthil Balakrishnan.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jesper Pedersen replied on Thu, 2010/05/13 - 7:52am

Thanks for the kind words ! Feel free to stop by our forum if you want to help with the project - we have a lot of tasks for the community :)

Senthil Balakrishnan replied on Tue, 2010/05/25 - 9:56am in response to: Jesper Pedersen

Will be excited to be part of it :)

Sri Kanth replied on Wed, 2011/08/10 - 7:44am

Hi Floks, can any one please help, how will we run jboss profiler using client and service side programing like webservice. i done all configrations and in properties also i given includes my package structure. but in command promt if i run the command at that time i did not get any ourt pur. any one please help me. Thanks, Srikanth

Sri Kanth replied on Wed, 2011/08/10 - 9:26am

HI while i am running the application and using the profiler i got the follwoing error Step1: [agilairedev@localhost jboss-profiler-2.0.0.Beta5]$ java -jar jboss-profiler-client.jar startProfiler Step2: i run my application i got ouput in my console Step 3: [agilairedev@localhost jboss-profiler-2.0.0.Beta5]$ java -jar jboss-profiler-client.jar stopProfiler Step4: Here i am facing the following problem [agilairedev@localhost jboss-profiler-2.0.0.Beta5]$ java -jar jboss-profiler-client.jar getSnapshot 2011-08-10 09:30:36,677 ERROR [org.jboss.profiler.client.cmd.Client] java.lang.NullPointerException at org.jboss.profiler.connectors.AbstractHandler.handleCommand(AbstractHandler.java:56) at org.jboss.profiler.connectors.SocketHandler.invoke(SocketHandler.java:50) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:930) at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234) at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163) at org.jboss.remoting.Client.invoke(Client.java:1634) at org.jboss.remoting.Client.invoke(Client.java:548) at org.jboss.remoting.Client.invoke(Client.java:536) at org.jboss.profiler.client.cmd.Client.main(Client.java:300) [agilairedev@localhost jboss-profiler-2.0.0.Beta5]$ I am using JbossProfiler 2.0Beta 5 version and Jboss Server 5.1 under linux environ ment can you please correct me if i am wrong

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.