+

Search Tips   |   Advanced Search

Generating a Liberty profile server dump from the command prompt

From the command prompt, we can use the server dump or server javadump command to capture status information for a Liberty profile server.

The server dump command is useful for problem diagnosis of a Liberty profile server because the result file contains server configuration, log information, and details of the deployed applications in the workarea directory. The command can be applied to either a running or a stopped server.

For a running server, the following information is also included:

The server javadump 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 command can be used only on a running server. Each dump type creates a file, but not all dump types are supported by all virtual machines. See server command options. The default directory for dump files is ${server.output.dir}. To set a different default directory, use an IBM JVM and set the following environment variables:            

  1. Open a command prompt, then change directory to the wlp/bin directory.

  2. Capture the status information using one of the following command-line tools. If we do not specify a server name, defaultServer is used.

    • To create a snapshot of the server status, use server dump command.

        • server dump server_name --archive=package_file_name.dump.zip --include=heap

        where package_file_name.dump.zip is a file name we choose. This file name can include a full path name. If the full path is omitted, a compressed file called package_file_name.dump.zip is created in default directory ${server.output.dir}.

      The --include parameter is optional. We can request additional memory dump types. For example, --include=heap option requests a heap dump; --include=thread,heap,system option requests a thread dump, a heap dump, and a system dump.

    • To create a snapshot of the JVM status, use server javadump command.

        • server javadump server_name --include=heap

      The --include parameter is optional. We can request additional memory dump types. For example, --include=heap option requests a heap dump; --include=heap,system option requests a heap dump and a system dump. The output files are created in the default directory ${server.output.dir}. To set a different default directory, use an IBM JVM and set the IBM_HEAPDUMPDIR, IBM_COREDIR, and IBM_JAVACOREDIR environment variables.

    The resulting file is created using UTF-8 encoding for entry names, so the tool that we 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.


Results

If the specified server does not exist, the command does not succeed. If the specified server exists, a result file is created containing the status information of the server.


Parent topic: Administer the Liberty profile from the command prompt

Reference:

  • server command options