server javadump command
Creates a snapshot of the JVM status of a server and saves the result into an archive file for further tuning and diagnosis.
The command is useful for diagnosing problems at the JVM level, such as hung threads, deadlocks, excessive processing, excessive memory consumption, memory leaks, and defects in the virtual machine. The server must be running for the command to capture results.
Each dump type creates a file, but not all dump types are supported by all virtual machines. The default directory for dump files is ${server.output.dir}
. To set a different default directory, you must use an IBM JVM and set the following environment variables:
-
${IBM_HEAPDUMPDIR}
-
${IBM_COREDIR}
-
${IBM_JAVACOREDIR}
The resulting file is created by using UTF-8 encoding for entry names, so the tool that you use to open the file must be able to use UTF-8 encoding for entry names. The jar
command in a Java SDK uses this format.
Usage examples
Capture the JVM status of the myserver
server:
server javadump myserver
Capture the JVM status of the myserver
server and add a heap dump:
server javadump myserver --include=heap
Capture the JVM status of the myserver
server and add heap and system dumps:
server javadump myserver --include=heap,system
Syntax
Run the command from the path_to_liberty/bin
directory.
server javadump serverName [options]
- serverName
-
The name of the server to diagnose. If the named server is not running or does not exist, the command fails. If no server name is specified, the command uses
defaultServer
. - options
-
One or more optional parameters.
Option
Option | Description |
---|---|
--include=diagnose_option,diagnose_option,… |
Specifies the type of diagnostic information to capture. The value of
|
Exit codes
The following exit codes are available for the server javadump
command and the equivalent executable JAR file ws-server.jar
:
- 0
-
OK. 0 indicates successful completion of the requested operation.
- 1
-
1 indicates that the JVM options that were used are not valid.
- 2
-
2 indicates that the server does not exist.
- >=20
-
Exit codes greater than or equal to 20 indicate that an error occurred while performing the request. Messages are printed and captured in log files with more information about the error.