United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7120511 Add diagnostic commands
7120511 : Add diagnostic commands

Details
Type:
Enhancement
Submit Date:
2011-12-12
Status:
Closed
Updated Date:
2012-03-29
Project Name:
JDK
Resolved Date:
2012-03-29
Component:
hotspot
OS:
generic
Sub-Component:
svc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u4
Fixed Versions:
hs23

Related Reports
Backport:
Backport:

Sub Tasks

Description
Add diagnostic commands to the HotSpot JVM to improve the monitoring features available from the jcmd utility.
The list of proposed diagnostic commands for this CR is:

Thread.print
        Print all threads with stacktraces.

GC.class_histogram
        Provides statistics about the Java heap usage

GC.heap_dump
        Generate a HPROF format dump of the Java heap

GC.run_finalization
        Calls java.lang.System.runFinalization().

GC.run
        Calls java.lang.System.gc().

VM.uptime
        Print VM uptime.

VM.flags
        Prints VM flag options and their current values. 

VM.system_properties
        Prints system properties

VM.command_line
        Print the command line used to start this VM instance.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/4f25538b54c9
                                     
2012-03-22
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/4f25538b54c9
                                     
2012-01-13
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/4f25538b54c9
                                     
2012-01-09
EVALUATION

Here's the detailed description of the diagnostic commands:

Thread.print
Print all threads with stacktraces.

Impact: Medium: Depends on the number of threads

Syntax : No Name [options]

Options: (options must be specified using the <key> or <key>=<value> syntax)
        -l : [optional] print java.util.concurrent lock (BOOLEAN, false)

---


GC.class_histogram
Provides statistics about the Java heap usage

Impact: High: Depends on Java heap size and content

Syntax : No Name [options]

Options: (options must be specified using the <key> or <key>=<value> syntax)
        -all : [optional] Inspect all objects, including unreachable objects (BOOLEAN, false)


---


GC.heap_dump
Generate a HPROF format dump of the Java heap

Impact: High: Depends on Java heap size and content

Syntax : No Name [options] <filename>

Arguments:
        filename :  Name of the dump file (STRING, no default value)

Options: (options must be specified using the <key> or <key>=<value> syntax)
        -all : [optional] Dump all objects, including unreachable objects (BOOLEAN, false)


---


GC.run_finalization
Calls java.lang.System.runFinalization().

Impact: Medium: Depends on Java content


---


GC.run
Calls java.lang.System.gc().

Impact: Medium: Depends on Java heap size and content


---


VM.uptime
Print VM uptime.

Impact: Low:

Syntax : No Name [options]

Options: (options must be specified using the <key> or <key>=<value> syntax)
        -date : [optional] Add a prefix with current date (BOOLEAN, false)


---


VM.flags
Prints VM flag options and their current values. 

Impact: Low:

Syntax : No Name [options]

Options: (options must be specified using the <key> or <key>=<value> syntax)
        -all : [optional] Print all flags supported by the VM (BOOLEAN, false)


---


VM.system_properties
Prints system properties

Impact: Low:


---


VM.command_line
Print the command line used to start this VM instance.

Impact: Low:
                                     
2011-12-12



Hardware and Software, Engineered to Work Together