Appearance
metaplay debug collect-heap-dump [ENVIRONMENT] [POD] [flags]
Collect a heap dump from a running server pod
Appearance
Collect a heap dump from a running server pod
metaplay debug collect-heap-dump [ENVIRONMENT] [POD] [flags] Collect a heap dump from a running .NET server pod using dotnet-gcdump or dotnet-dump.
WARNING: This operation is very intrusive as it completely freezes the target process for the duration of the operation. This can be from seconds to minutes, depending on the process heap size.
This command will create a debug container, collect the heap dump using the specified mode (dotnet-gcdump for managed heap only, or dotnet-dump for full process dump), and copy it back to your local machine.
The health probes will be temporarily modified to always return a success value to avoid the kubelet from considering the game server to not be responsive which would lead to its termination.
Expected arguments:
# Collect heap dump from the only running pod.
metaplay debug collect-heap-dump nimbly
# Collect heap dump from pod 'service-0'.
metaplay debug collect-heap-dump nimbly service-0
# Use 'dotnet-dump' for full process dump instead of 'dotnet-gcdump'.
metaplay debug collect-heap-dump nimbly --mode=dump
# Specify custom output path. Use .gcdump extension for gcdump mode, and no extension for dump mode.
metaplay debug collect-heap-dump nimbly -o /path/to/output.gcdump
metaplay debug collect-heap-dump nimbly --mode=dump -o /path/to/core_250901_093000
# Don't ask for confirmation on the operation.
metaplay debug collect-heap-dump nimbly --yes--mode <string>: Collection mode: 'gcdump' (managed heap) or 'dump' (full process dump) (default: gcdump)--output <string>: Output path for the heap dump file (default: dump-YYYYMMDD-hhmmss.gcdump for gcdump mode, core_YYMMDD_HHMMSS for dump mode)--yes: Skip heap size warning and proceed with dump--color <string>: Should the output be colored (yes/no/auto)? [env: METAPLAYCLI_COLOR] (default: auto)--project <string>: Path to the to project directory (where metaplay-project.yaml is located)--skip-version-check: Skip the check for a new CLI version being available--verbose: Enable verbose logging, useful for troubleshooting [env: METAPLAYCLI_VERBOSE]