Heap and Threaddump deprecated

Generating heap and thread dumps for the OX App Suite Middleware.

This document describes how to create a heap and threaddump from a java OX App Suite Middleware service running inside the Kubernetes cluster.

Prerequisites

  • An active shell to a running Toolkit Container within the cluster. See Starting.

Commands

To create a heap and thread dump from a running OX App Suite Middleware process, use the mwctl debug tool with its heapdump and threaddump subcommands.


Tip:

When entering a command, you can use the Tab key to autocomplete the pod name for convenience and accuracy.

Heap dump

Creating a heap dump on the target system:

 mwctl debug heapdump <POD>

By default, the heap dump is written and compressed to the /tmp directory on the Middleware container's file system. For example.: /tmp/heapdump_1720008357.hprof.tar.gz.

You can also use the --download flag if you prefer to transfer the heap dump to the Toolkit Container for further processing.

 mwctl debug heapdump --download <POD>

This will download the created heap dump to the Toolkit Container and place it into your current working directory.

Refer to "debug heapdump" for a detailed explanation and a list of all available options.

To transfer the heap dump to your local computer, you can use a standard kubectl cp command. For example:

kubectl cp -n <NAMESPACE> <POD>:<FILENAME> --retries 20

Thread dump

To create a thread dump from a running OX App Suite Middleware process, use the mwctl tool with its debug and heapdump subcommands.

mwctl debug threaddump -s <POD>

This command creates a single (-s) thread dump from the OX App Suite Middleware process on the specified pod and prints it to your terminal.

Instead of generating a single thread dump, the command can also create more comprehensive dumps, including multiple single dumps and top(1) outputs.

mwctl debug threaddump <POD>

This command will create five separate thread dumps and a top(1) output, each saved in a separate file that will be downloaded into current working directory of the Toolkit Container afterward. For example.: ./threaddumps_1720011630/

To transfer a thread dump file to your local computer, you can use a standard kubectl cp command. For example:

kubectl cp -n <NAMESPACE> <POD>:<FILENAME> --retries 20

Refer to "debug threaddump" for a detailed explanation and a list of all available options.