generate-jvm-report [--help] [--type=jvm-statistic-type] [--target target]
The generate-jvm-report subcommand creates a report that shows the threads (dump of stack trace), classes, memory, or loggers for a given target instance, including the domain administration server (DAS). If a type is not specified, a summary report is generated. This subcommand only provides statistics for the GlassFish Server instance processes. This subcommand provides an alternative to sending Ctrl+Break or kill -3 signals to GlassFish Server processes to obtain a stack trace for processes that are hanging.
The information in the report is obtained from managed beans (MBeans) and MXBeans that are provided in the Java Platform, Standard Edition (Java SE ) or JDKTM software with which GlassFish Server is being used.
If GlassFish Server is running in the Java Runtime Environment (JRETM) software from JDK release 6 or Java SE 6, additional information is provided. For example:
System load on the available processors
Object monitors that are currently held or requested by a thread
Lock objects that a thread is holding, for example, ReentrantLock objects and ReentrantReadWriteLock objects
If the JRE software cannot provide this information, the report contains the text NOT_AVAILABLE.
This subcommand is supported in remote mode only.
Displays the help text for the subcommand.
Do not specify this option. This option is retained for compatibility with other releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and the option is silently ignored.
The type of report that is to be generated. Default is summary.
Displays summary information about the threads, classes, and memory (default).
Provides information about heap and non-heap memory consumption, memory pools, and garbage collection statistics for a given target instance.
Provides information about the class loader for a given target instance.
Provides information about threads running and the thread dump (stack trace) for a given target instance.
Provides information about the loggers that are registered in the Virtual Machine for the Java platform (Java Virtual Machine or JVMTM machine). [The terms "Java Virtual Machine" and "JVM" mean a Virtual Machine for the Java platform.]
This example shows a partial listing of a report that is generated if no type is specified. This same report is generated if the summary type is specified.
asadmin> generate-jvm-report Operating System Information: Name of the Operating System: SunOS Binary Architecture name of the Operating System: sparc, Version: 5.10 Number of processors available on the Operating System: 32 System load on the available processors for the last minute: 7.921875. (Sum of running and queued runnable entities per minute) General Java Runtime Environment Information for the VM: 64097@sr1-usca-22 ... sun.desktop = gnome sun.io.unicode.encoding = UnicodeBig sun.java.launcher = SUN_STANDARD sun.jnu.encoding = ISO646-US sun.management.compiler = HotSpot Client Compiler sun.os.patch.level = unknown user.dir = /home/thisuser/GlassFish/glassfishv3/glassfish/domains/mydomain4/config user.home = /home/thisuser user.language = en user.name = thisuser user.timezone = US/Pacific Command generate-jvm-report executed successfully
This example generates a report that shows information on the class loader.
asadmin> generate-jvm-report --type=class Class loading and unloading in the Java Virtual Machine: Number of classes currently loaded in the Java Virtual Machine: 3,781 Number of classes loaded in the Java Virtual Machine since the startup: 3,868 Number of classes unloaded from the Java Virtual Machine: 87 Just-in-time (JIT) compilation information in the Java Virtual Machine: Java Virtual Machine compilation monitoring allowed: true Name of the Just-in-time (JIT) compiler: HotSpot Client Compiler Total time spent in compilation: 0 Hours 0 Minutes 4 Seconds Command generate-jvm-report executed successfully.