Obtaining garbage collection data for analysis
Garbage collection data can be collected in either one of the following two ways:
Data collection with
-Xverbosegc.Launch the Java application using the
–Xverbosegcoption. For more information on the option, see NSJ 11Tools Reference Pages.Data collection with Zero preparation.
Data collection can be started from the command line by sending a signal to the Java process to indicate JVM to start GC data collection.
To collect GC data without interrupting an already running application, perform the following from the command line:Confirm that
-Xverbosegcor-Xloggcoption is not specified.Locate the process ID of the running Java application.
Start the profiling interval. Send a signal to the JVM by typing the following command:
kill -ALRM pid or kill -14 pidThe GC data is written to a file named
java_pid.vgcin the current directory of the JVM process.Allow the profiling to continue for a desired length of time.
Stop the data collection interval by sending the same signal to the JVM:
kill -ALRM pidYou can now open the saved file in the
NSjmeterconsole and view the collected metrics.
Transfer the data file to an
NSjmeterconsole compatible platform (HP-UX, Windows, or Linux).Run the
NSjmeterconsole and open the data file.
NSJ supports rotational GC logging in multiple GC log files to help control the GC log file size. For information on GC log rotation, see GC log rotation.
For information on analyzing GC profile data and instructions to use
NSjmeter tool, see
NonStop NSjmeter 5.0 User Guide.

