3 Replies Latest reply on Nov 6, 2008 10:34 AM by peterj

    Usage of snapshots

    spausnet1

      Hello,
      We are currently investigating an issue as to why our Jboss application server shuts down (crashes) on a weekly basis. Usage of snapshots to monitor freememory and threadcounts in the Jboss web-console seemed to be a good idea at the time, however, when Jboss does crash, the snapshots are lost! Is there are way to write snapshot data to a file? Or are snapshots of no use when investigating a Jboss shutdown?

        • 1. Re: Usage of snapshots
          peterj

          This topic comes up quite often. If you search the forums you might find some hints as to what to do. Here are two recent discussions to get you started.

          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=125923

          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114996

          • 2. Re: Usage of snapshots
            spausnet1

            Thanks,

            However our log files do not mention the word shutdown. The log file just stops being written to, until jboss restarts.

            We have increased the memory allocation, and fingers crossed it helps.

            Otherwise, I have found this from a pdf "JBossProfiler Guide.pdf";

            3.2. Capturing a Snapshot
            Steps to extract a snapshot:
            - Add jbossAgent.dll to your path or libjbossAgent.so to your LD_LIBRARY_PATH
            - Add -agentlib:jbossAgent to your JVM 5 command line. (Java 5 at least is required as JVMTI was introduced on
            Java 5)
            - Go to JMX Console (http://localhost:8080/jmx-console) and look for JBossProfiler:JVMTI MBean
            (mbean=JVMTIClass)
            - Call heapSnapshot from JVMTIClass MBean. use P1 as a prefix, and P2 as the extension. For instance
            P1=/tmp/log, and P2=mem. This will create three files starting with log under /tmp, with extension=.mem
            - Use the JbossProfiler application (http://localhost:8080/jboss-profiler) after you have installed jboss-profiler.war
            to your /deploy directory.


            • 3. Re: Usage of snapshots
              peterj

               

              The log file just stops being written to, until jboss restarts.


              This sounds like either a JVM crash, or the OS is forcibly terminating the process (e.g., kill -9 on Linux or End Process in Task Manager on Windows). For the former, a process dump file might be present. For the later, you might have to dig through OS config settings to see if there is something, such as a scheduled task, that is killing the process.