Skip to content

Instantly share code, notes, and snippets.

@kshyju
Last active May 28, 2025 23:57
Show Gist options
  • Save kshyju/1dbfd83bc52363235818f1eadb0dd0f3 to your computer and use it in GitHub Desktop.
Save kshyju/1dbfd83bc52363235818f1eadb0dd0f3 to your computer and use it in GitHub Desktop.
Process dump collection on Linux

🧠 Collecting a .NET Dump on Linux

πŸ”§ Step 1: Install dotnet-dump

apt-get update
apt-get install wget -y
wget https://aka.ms/dotnet-dump/linux-x64 -O dotnet-dump
chmod +x dotnet-dump

🧾 Step 2: Find the .NET Process

./dotnet-dump ps

πŸ” Note: Identify the PID (process ID) of the target process from the output.

πŸ“¦ Step 3: Collect the Dump

./dotnet-dump collect --process-id <PID> -o myapp.dmp

Replace <PID> with the actual process ID from the previous step.


☁️ Uploading the Dump using AzCopy

πŸ“₯ Step 4: Install AzCopy

wget https://aka.ms/downloadazcopy-v10-linux -O azcopy.tar.gz

πŸ“‚ Step 5: Extract the Archive

tar -xvf azcopy.tar.gz
ls

πŸ“ Note: Locate the extracted folder name. It should be something like azcopy_linux_amd64_10.28.1.

πŸš€ Step 6: Upload the Dump File

./azcopy_linux_amd64_10.28.1/azcopy copy myapp.dmp "{SAS_URL}"

Replace {SAS_URL} with your actual SAS URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment