This chapter is an alphabetically ordered reference for all the diagnostic commands that you can send to a running Oracle JRockit JVM process.
For more information about sending diagnostic commands to a JVM process, see "Running Diagnostic Commands" in Oracle JRockit JDK Tools Guide.
This chapter describes the following diagnostic commands and their attributes:
This command is associated with Oracle JRockit Flight Recorder. It prints information about the status of Flight Recording. This command accepts the following arguments:
Argument | Description |
---|---|
name |
The recording identifier as a string. If you use this parameter, you do not have to specify a value for recording . |
recording |
The recording identifier as a number. If you use this parameter, you do not have to specify a value for name . |
verbose |
Specifies whether or not to enable verbose output.
The default value is |
This command prints the command-line options used to start the JRockit JVM.
This command is associated with Oracle JRockit Flight Recorder. It dumps the running Flight Recorder recordings. This command accepts the following arguments:
Argument | Description |
---|---|
name |
The recording identifier as a string. If you use this parameter, you do not have to specify a value for recording . |
recording |
The recording identifier as a number. If you use this parameter, you do not have to specify a value for name . |
copy_to_file |
Specify the name of the file to which you want the recording data to be copied. |
compress_copy |
Compress the file at the copy_to_file location using GZip. The default value is false . |
This command filters exception logging and JRockit Flight Recorder exception events based on the exception type specified. This command accepts the following argument:
Argument | Description |
---|---|
pattern |
Specify the exception type as a string. For example:
|
Forces the Oracle JRockit JVM to execute code that will make the process fail and create a core file.
This command is not enabled by default because of the serious implications of using it. Use this command only for diagnosing problems that require getting the full state of the JVM. To be able to run the command, start JRockit with -Djrockit.ctrlbreak.enableforce_crash=true
.
This command causes JRockit to fork a child process that will immediately abort. If the environment has been properly configured to generate a core file when a process crashes, a core file will be created. This command is intended for generating a core file when tools such as gdb
or gcore
cannot be used. Since the core file generated using this command will not include context information for each thread, generating a core file using gdb
or gcore
is always preferred when possible.
Note:
This command is available since R28.3.9. This command is not available on Windows environments.This command causes a heap diagnostic report to be printed (also, see -XX:HeapDiagnosticsOnOutOfMemoryError
in the Oracle JRockit Command Line Reference). This command sends output to the Ctrl-Break Handler output stream and not to the path specified by the -XX:HeapDiagnosticsPath
option.
This command displays additional information about a specific command or all commands. This command accepts the following arguments:
Argument | Description |
---|---|
all |
Shows help for all commands. The default is false ; this argument is optional. |
command |
Shows help for the specified command. This argument is optional. If you omit it, the command will show a list of available commands. |
This command generates an HPROF format dump of the Java heap.
hprofdump [filename=<file>] [segment_threshold] [segment_size]
This command accepts the following arguments:
Argument | Description |
---|---|
filename |
Sets the name of the file to which the dump should be written. If you do not specify a filename, the command will use the value specified with the -XX:HeapDumpPath command-line option. |
segment_threshold |
Sets the amount of heap usage above which the JVM should generate a segmented heap dump (JAVA PROFILE 1.0.2 format). If you do not specify a segment threshold, the command will use the default value of -XX:SegmentedHeapDumpThreshold , as described in the Oracle JRockit Command-Line Reference. |
segment_size |
Sets the approximate segment size to which a generated segmented heap dump should be limited. If you do not specify segment_size , this command uses the default value set for -XX:HeapDumpSegmentSize , as described in the Oracle JRockit Command-Line Reference. |
This command stops the management server by shutting down the listening socket. The managementserver.jar
has to be in the boot classpath for this command to work.
This command lists the flag options in the Oracle JRockit JVM and their current values:
flag
: Lists only this flag.
describe
: Shows the description for flags.
alias
: Prints the flag alias if one is available.
setonly
: Lists only flags that are explicitly or implicitly set.
This command prints the current values of the lock profile counters. You can enable lock profiling by using the -XX+UseLockProfiling
option.
This command resets the current values of the lock profile counters. You can enable lock profiling by using the -XX+UseLockProfiling
option.
This command starts or shuts down the memory leak server. This command accepts the following arguments:
Argument | Description |
---|---|
port |
Identifies the port to which to bind. The default value is 7095 . |
version |
Identifies the required protocol version. The default value is 3 . |
action |
Starts or stops the server. The default is to toggle state. |
force |
Forces an action. The default value is false . |
This command prints all loaded classes.
This command enables or disables the printing of exceptions (see -Xverbose
in the Oracle JRockit Command-Line Reference).
print_exceptions stacktraces= all|true|false][exceptions= all|true|false]
Note:
To turn exception printing off completely, setexceptions=false
even if it was turned on by stacktraces=true
.This command prints all memory used by the JRockit JVM process, per OS data, plus any memory usage perceived by each subsystem.
To get the most detailed information out of this command, set USE_OS_MALLOC
to 0
in your environment variables. Also, if you enable the variable TRACE_ALLOC_SITES
(that is, set it to 1
) to enable allocation site tracking by default, you might add some overhead, but you will also receive information about the location of every allocation.
print_memusage [baseline] [test] [level=<1 | 2 | 3>] [reset] [displayMap]
Use print_memusag
e with any of the following arguments:
Argument | Description |
---|---|
baseline |
Stores a snapshot of the memory usage. |
test |
Prints the difference between this stored baseline and the previously stored baseline. |
level |
Specifies the level of detail to be printed. Level 1 gives memory usage for the source files; level 2 gives more detail, providing memory usage for the function name; level 3 provides the most detail, providing memory usage statistics at the source code level. |
reset |
Prints the memory usage statistics and removes the stored baseline. Further print_memusage results will not show any difference until a new baseline is set. |
displayMap |
Sets the memory usage baseline on the virtual memory. |
See the Memory Leak Detector online help that ships with Oracle JRockit Mission Control.
Prints a normal thread dump.
print_threads [nativestack= true] [jvmmonitors=true]
This command accepts these arguments:
Argument | Description |
---|---|
compact |
Prints all threads with the same stacktrace together (will not print nativestack or monitors). The default value is false . |
concurrentlocks |
Prints java.util.concurrent locks. The default value is false . |
internal |
Prints Oracle JRockit internal threads. The default value is true . |
javastack |
Prints Java stack frames. The default value is false . |
jvmmonitors: true |
Prints the JRockit JVM's internal native locks (those that are registered): status and wait queue, and, with XX:+UseNativeLockProfiling , their profile statistics (acquired/contended/tryfailed). |
monitors |
Prints lock information. The default value is true . |
nativestack: true |
Includes native frames in the stack trace. The default value is false . |
This command prints all UTF8 strings.
This command prints information about the internal state of the JVM. This information can be used for troubleshooting by Oracle support and is the same information that is included in Oracle JRockit failure reports.
This command calls the java.lang.System.gc()
method and runs the garbage collector.
runsystemgc [full=false] [fullcompact=true]
The command accepts these arguments:
Argument | Description |
---|---|
full | Does a full garbage collection.
It inherits the system default value (see -XXfullSystemGC). |
fullcompact | Forces full compaction for each full garbage collection event. The default value is true . |
This command sets the file that all commands following this command will use for printing. You can have several set_filename
commands in a file. By default, for SIGQUIT
or ctrl+break
invocations, the commands print to the stderr
output stream of the JVM. For jrcmd
invocations, the print goes to the stdout
output stream of the jrcmd
process by default. The append
argument defaults to overwrite.
set_filename [filename=<file>] [append=true]
Argument | Description |
---|---|
filename |
(Optional) Specifies the name of the file for printing. If not specified, JVM will reset to the default behavior. |
append |
(Optional) Specifies whether you want to append to the file or overwrite it. |
Starts a flight recording. This command accepts the following arguments:
Argument | Description |
---|---|
compress: true |
Directs the Flight Recorder to gzip the .jfr file on the disk.The default value is false . |
defaultrecording: true |
Enables a default recording. The default value is false. |
delay |
Sets the amount of time to elapse during run time before starting the recording. |
duration |
Sets the amount of time for the recording to run. |
filename |
Sets the name of the flight recording log file. This file will have the extension .jfr. |
maxage |
For time-bound recordings, sets the maximum amount of time a recording can last before that recording is flushed from the thread buffer to the global buffer. |
maxsize |
For size-bound recordings, sets the maximum size of a recording before that recording is flushed from the thread buffer to the global buffer. |
name |
Sets a recording identifier. |
settings |
Identifies the event settings file to use for the recording. |
This command starts the management server by starting the listening socket that, in turn, starts servers whenever a connection is established. This command accepts these arguments:
Argument | Description |
---|---|
none |
Enables the JMX local monitoring through a JMX connector published on a private interface used by local JMX clients that use the Attach API. |
autodiscovery |
Enables or disables autodiscovery for the remote JMX connector, which enables Oracle JRockit Mission Control to automatically discover running JRockit JVM instances through the multicast-based JRockit Discovery Protocol (JDP). |
autodiscovery_name |
Enables you to specify the path and name of the cluster and node from where Oracle JRockit Mission Control discover information about various JRockit JVM instances running in a network. |
authenticate |
Enables or disables authentication. When this property is set to false, JMX does not use passwords or access files. All users are allowed all access. |
class |
Loads the class and causes its empty constructor to be called early in the JVM startup. From the constructor, a new thread is then started, from which your management client is run. Further arguments cannot be given to -Xmanagement after the class argument. |
config_file |
Specifies the location of the file from which additional management configuration properties are loaded. |
interface |
Specifies the local address (on the management server side) on which to listen for connections. This applies to machines with several addresses (network cards). |
local |
Enables or disables the local JMX connector. |
port |
Identifies the port that the management server opens for remote access. |
registry_ssl |
Binds the RMI connector stub to an RMI registry protected by SSL. |
remote |
Enables or disables the remote JMX connector. |
rmiserver_port |
Binds the RMI server to the specified port. |
ssl |
Enables or disables SSL encryption. |
This command serves the same purpose as the -Xmanagement
command-line option. For more information, see the entry for -Xmanagement
in the Oracle JRockit Command Line Reference.
This command stops an in-process flight recording. This command accepts the following arguments:
stop_flightrecording [name=<string>][recording=<s8>] [discard=<true | false>] [copy_to_file=<string>] [compress_copy=<true | false>]
Argument | Description |
---|---|
name |
Recording identifier as a string. |
recording |
Recording identifier as a number. |
discard |
Discards the recording; the default is false . |
copy_to_file |
Transfers the recording to a .jfr file. |
compress_copy |
Gzip the .jfr file on disk. |
This command stops the management server.
This command prints a timestamp, including the uptime of the queried JVM..
This command changes the verbosity level usually specified with -Xverbose
.
verbosity [args=<components>] [filename=<file>]
This command prints the JRockit JVM version.