7 Replies Latest reply on Aug 18, 2006 12:54 PM by msolnit

    All the data files are of size "0" bytes

    jboss05

      Hi All,

      I've downloaded the latest 1.0RC2 version of jboss profiler. I've followed the following steps to install/deploy jboss profiler on jboss 3.2.7

      Set the JAVA_OPTS=-XrunjbossInspector:/tmp/profiler,include=com.espresso,ignore=*

      copied the libjbossInspector.jnilib in the classpath

      copied the jboss-profiler-noAOP.sar and jboss-profiler.war files into the deploy directory of jboss 3.2.7.

      Started jboss.


      Through the jmx console, i've started the data caturing. When i started this, i saw many 0 bytes file under /tmp/profiler folder. Then i ran some test cases again my service running under jboss that i'm profiling. Then stopped the data capturing using the jmx console.

      After this, all the files under /tmp/profiler are of zero bytes.

      But instead of using the jboss-profiler-noAOP.sar and jboss-profiler.war, if i use kill -3 pid, i see the data files being generated properly.


      Could someone please let me know what's that i'm missing?


      Also, i'm not sure how to use memory profiler. When i set the JAVA_OPTS as follows:
      JAVA_OPTS=-XrunjbossInspector:/tmp/profiler,include=com.espresso,ignore=*,memory=false

      Is the memory profiling enabled or disabled? Also, when start the web application to analyze the data and click the memory profiler link, i'm asked to input the following:

      Memory Profiler File Prefix
      Extention

      Could someone please tell from where could i get this information?

      Thanks for any input in advance!

        • 1. Re: All the data files are of size
          clebert.suconic

          For the memory profiler, you will have to use the JVMTI module, and use -agentLib:jbossAgent and them use the MBean.

          Say, for P1 on the MBean you will have to select for instance /tmp/mem, and p2=log. That will create three files on /tmp/ starting with mem and finishingwith log.



          For the start/stop on Mac-OS I'm not sure on what's happening. I will try to borrow a MAC computer to try it.


          Clebert

          • 2. Re: All the data files are of size
            jboss05

            Thanks for your fast response Clebert.

            Can you please tell me from where can i get JVMTI module from? I didn't understand the instructions related to -agentLib:jbossAgent either? Can you provide me any example?

            I've another issue while running jboss profiler. In this case, i've not deployed jboss-profiler-noAOP.sar. I'm using the kill -3 pid command to start the data capturing and stop. The first time (i'm freshly starting jboss and my service that i'm profiling) the data files are captured under /tmp/profiler and everything is fine.

            But WITHOUT restarting jboss server, if i send the kill -3 pid command to capture the data files AGAIN (i need fresh set of data at that moment), no NEW data files are created. I'm trying to simulate a production environment where i can start/stop data capturing without restarting the server.

            Could you please tell me if this is possible with jboss profiler and if yes, why i'm not seeing the data files?

            Thanks again!

            • 3. Re: All the data files are of size
              clebert.suconic

              There are two native libraries for JBossProfiler.

              A JVMPI version (jbossInspector) which can do memory profiling associated with methods

              A JVMTI version (jbossAgent) which can do memor profiling for finding memory leaks.

              That way you have jbossIspector working as runtime profiler and jbossAgent working as memory profiler.

              On the download package, look at jvmti-src.
              There are compiling scripts for linux and win32.

              I don't have a binary for MacOS under jvmti.

              If someone provide me a compiled version I can add it to the download package.

              I will try to borrow a MAC next week to compile it myself if you can' t do it.

              I'm also planning add more documentation next week.

              At least I will be able to upload my presentation from JBossWork barcelona. There are some good screenshots what would help understanding the memor profiler.


              The memory profiler should be easy to use it, but I need to finish documentation.


              Clebert

              • 4. Re: All the data files are of size
                msolnit

                Hi Clebert. I was looking for information on running the Memory Profiler with a Mac and came across this thread. Is there any update? From what I can tell, there is no jbossAgent for Mac OS X in the latest version (RC3).

                -- Matt

                • 5. Re: All the data files are of size
                  clebert.suconic

                  Hello Matt,


                  I tried to compile the modules on Mac, but I couldn't do it as fast as I thought I would be able to do it.

                  I will try again this week... The problem is I don't have a MAC so I have or to borrow one or to have someone doing it for me.

                  If you can do it... you could maybe send me an e-mail offline... then I would help you compile it... and put the binaries on the distribution.

                  Thanks,

                  Clebert

                  PS: Sorry about the delay answering this thread.

                  • 6. Re: All the data files are of size
                    msolnit

                    Hi Clebert. I've actually made some progress here. There are a couple of issues I found:

                    1. The JVMPI binary shipped for Mac OS X is specific to PowerPC. However, it is easy to re-compile it and get an Intel binary. I am going to research how we can change the script to produce a Universal Binary, and then you can include that in the download instead.
                    2. There is no JVMTI binary included (which is where we started :-)). The compile.sh script wasn't working, and after a while I figured out that this is because it is using DOS carriage returns. Converting it to unix format makes the script run correctly, and I now have a .jnilib file :-). I'll test it out and see if it works.

                    -- Matt

                    • 7. Re: All the data files are of size
                      msolnit

                      One more thing: the compile.sh for the JVMTI library produces a lot of warnings. In particular, the -shared option is not supported, and the -fpic option is supposed to be -fPIC. However, I am not sure why these options are even specified, since they're not for the Linux or Solaris versions. My GCC knowledge is a little weak here :-).

                      -- Matt