Appearance
metaplay debug collect-cpu-profile [ENVIRONMENT] [POD] [flags]
Collect a CPU profile from a running server pod
Appearance
Collect a CPU profile from a running server pod
metaplay debug collect-cpu-profile [ENVIRONMENT] [POD] [flags] Collect a CPU profile from a running .NET server pod using dotnet-trace.
This command will create a debug container, collect the CPU profile using dotnet-trace, 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 CPU profile from the only running pod.
metaplay debug collect-cpu-profile nimbly
# Collect CPU profile from pod 'service-0'.
metaplay debug collect-cpu-profile nimbly service-0
# Specify custom output path on your disk.
metaplay debug collect-cpu-profile nimbly -o /path/to/output.nettrace
# Specify format (speedscope, chromium, nettrace)
metaplay debug collect-cpu-profile nimbly --format speedscope
# Specify duration in seconds (default: 30)
metaplay debug collect-cpu-profile nimbly --duration 60
# Pass extra arguments to dotnet-trace (after --)
metaplay debug collect-cpu-profile nimbly -- --providers Microsoft-Windows-DotNETRuntime:4:4--duration <int>: Duration of the trace in seconds (default: 30)--format <string>: Output format: 'nettrace', 'speedscope', or 'chromium' (default: nettrace)--output <string>: Output path for the CPU profile file (default: profile-YYYYMMDD-hhmmss.nettrace)--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]