#1 Global Leader in Data Resilience

How to Collect Process Dumps and Logs

KB ID: 4563
Product: Veeam Backup & Replication
Published: 2024-03-22
Last Modified: 2024-10-03
Languages: JP
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Article Applicability

This article was created to complement KB1727 and provide customers with specific instructions to collect information that will:

  • Help Veam Support identify if the job or task is actually stuck or if it is working on something in the background.
  • Help the Development team diagnose the underlying issue if Support determines the job or task is legitimately stuck.

Purpose

This article documents procedures for collecting process dumps and logs to be provided to Veeam Support when investigating a job or task that is believed to be stuck within Veeam Backup & Replication.

Solution

Part 1: Collect Process Dumps

  1. On the Veeam Backup Server, open Task Manager.
  2. Within Task Manager, switch to the Details view, which lists all running processes.
  3. Create a Process dump file for each process named Veeam.Backup.Manager.exe or VeeamAgent.exe.
    1. Right-click on the Process
    2. From the context menu, select Create dump file.
    3. Note the location where the 'Dumping process' window reports the .dmp file was stored.
create dump

Part 2: Export Command Line Info for Active Processes

  1. Save the output from the following script to a text file:
$processNames = "VeeamAgent", "Veeam.Backup.Manager"
$matchingProcesses = Get-Process | Where-Object { $processNames -contains $_.ProcessName }
if ($matchingProcesses -eq $null) {
Write-Host "Processes, $processNames, were not detected."
} else {
$processDetails = @()
foreach ($process in $matchingProcesses) {
$commandLine = (Get-CimInstance -ClassName Win32_Process -Filter "ProcessId = $($process.Id)").CommandLine
$processDetail = [PSCustomObject]@{
PID = $process.Id
StartTime = $process.StartTime
CommandLine = $commandLine
}
$processDetails += $processDetail
}
$logFilePath = "$env:TEMP\PIDs.GUIDs.$(Get-Date -Format 'yyyyMMddHHmmss').log"
$processDetails | Out-File $logFilePath -Width 10000
Start-Process -FilePath notepad.exe -ArgumentList $logFilePath
}
  1. Combine the generated .dmp files from Step 3 and the output text file from Step 4 into a single ZIP file.

 

Part 3: Collect Veeam Backup & Replication Logs

  1. Open the Veeam Backup & Replication Console
  2. Export logs from Veeam Backup & Replication. Select all components, and specify a time range of the past 1 day.

 

Part 4: Attach Collected Diagnostic Data to Case

  1. Attach the two zip files (from step 5 and step 7) to a Veeam Support case.
    Note: The log bundle generated by Veeam Backup & Replication must remain separate and attached to the case individually.

More Information

Automated Collection via Script

This script is provided as a courtesy for exporting Process Dumps and other relevant information to investigate a "stuck" job.

Please be aware that the process dump generation may cause a short burst of high CPU activity.

No support is provided for this script, and should it fail, please proceed to collect the required information manually.

This script requires the Sysinternals tool ProcDump from Microsoft.

The combination of this script and procdump.exe can be run on the Veeam Backup Server or any related Windows-based component server to collect relevant process dumps. The script will only export Veeam Backup & Replication logs when run on the Veeam Backup Server.

 

  1. Download ProcDump and extract ProcDump.exe to a folder.
    Note: The default folder used by the script is C:\temp\.
  2. Save the following script as ProcDump.ps1 file in the same folder as where you stored ProcDump.exe.
Click to expand and view the script.
#Configurable Variables
$procDump = "C:\temp\procdump.exe"
$logFolder = "C:\temp\"

#Define Processes and Log Output Specifications
$processNames = "VeeamAgent", "Veeam.Backup.Manager"
$PSDefaultParameterValues['Out-File:Width'] = 2000
$bundleLogs = 0 #leave set to 0, the script will set it to 1 if it collects something that needs to be compressed.

#Create Log Write Function
function Write-HostWithLog {
param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Message
)
$formattedMessage = $Message
# Write to console
Write-Host $formattedMessage
# Write to log file
$formattedMessage | Out-File -FilePath $logFile -Append
}

# Create Log Folder and Script Log File
$logPath = (Join-Path -Path $logFolder -ChildPath "KB1727_Logs_$(Get-Date -Format "yyMMddHHmmss")")
New-Item -ItemType Directory -Path $logPath -Force
$logFile = (Join-Path -Path $logPath -ChildPath "DumpLog.log")


#Get the processes that match the specified process names
$matchingProcesses = Get-Process | Where-Object { $processNames -contains $_.ProcessName }
#If no processes are found, skip process dumping
if ($matchingProcesses -eq $null) {
Write-HostWithLog "Processes $processNames were not detected. No processes to dump."
} else {
$bundleLogs = 1
#List Processes
Write-HostWithLog "The following processes were found:"
Write-HostWithLog (($matchingProcesses) | Out-String)
# Create a process dump for each matching process
foreach ($process in $matchingProcesses) {
$dumpFilePath = Join-Path -Path $logPath -ChildPath "$($process.Name)_$($process.Id)_$(Get-Date -Format "yyyyMMdd_HHmmss").dmp"
$commandLine = $(Get-CimInstance -ClassName Win32_Process -Filter "ProcessId = $($process.Id)").CommandLine
Write-HostWithLog "Creating dump for process: [$($process.Name)] with PID [$($process.Id)]"
Write-HostWithLog "Process Command Line: [$commandLine]"
#Dump Process
Start-Process -FilePath $procDump -ArgumentList "-accepteula -ma $($process.Id) $dumpFilePath" -NoNewWindow -Wait
Write-HostWithLog "Dump Created: [$dumpFilePath]"
Write-HostWithLog "------------------------------------------------"
}
}
#Test if VBR cmdlets are available
if (Get-Command Get-VBRJob -errorAction SilentlyContinue) {
#Dump job lists
Write-HostWithLog "Backup Jobs"
Write-HostWithLog ((get-VBRJob | ft Name, ID, SourceType, IsRunning) | Out-String)
Write-HostWithLog "Computer Backup Jobs"
Write-HostWithLog ((Get-VBRComputerBackupJob | ft Name, Id, Type, Mode) | Out-String)
Write-HostWithLog "Unstructured Backup Jobs"
Write-HostWithLog ((Get-VBRUnstructuredBackupJob | ft Name, Id) | Out-String)
Write-HostWithLog "SureBackup Jobs"
Write-HostWithLog ((Get-VBRSureBackupJob | ft Name,Id,VirtualLab,ApplicationGroup) | Out-String)
Write-HostWithLog "Tape Jobs"
Write-HostWithLog ((Get-VBRTapeJob | ft Name, Id) | Out-String)
#Dump Logs
Export-VBRLogs -Server $(Get-VBRServer) -FolderPath $logFolder -LastDays 1
$bundleLogs = 1
} else {
Write-HostWithLog "Veeam Backup & Replication cmdlets not detected, assuming this is not being run on the Veeam Backup Server. Skipping job listing."
}

#Create Log Bundle
$zipFilePath = Join-Path -Path $logFolder -ChildPath ("KB1727_Logs_$($env:COMPUTERNAME)_$(Get-Date -Format 'yyyyMMdd_HHmmss').zip")
if ($bundleLogs -eq 1 ) {
Compress-Archive -Path $logPath\* -DestinationPath $zipFilePath -Force
#Open Explorer
explorer $logFolder
} else {
Write-HostWithLog "Nothing collected. Exiting."
}
  1. Update the script and ensure the paths specified for $procDump and $logFolder are correct.
  2. Open an Administrative PowerShell console and run the script. It will:
    • For each Veeam.Backup.Manager.exe and VeeamAgent.exe that is running:
      • Write to a log file the command line used to start that process, which helps correlate each process to a task GUID.
      • Create a process dump file.
    • Export a list of all jobs and their associated GUIDs.
    • Export Veeam Backup & Replication logs for all components for the past 1 day.
    • Create two zip bundles within the $logFolder:
      • KB1727_Logs_<hostname>_yyyymmdd_hhmmss.zip
      • VeeamSupportLogs\yyyy-mm-ddThhmmss_VeeamBackupLogs.zip
        Note: This zip file will be stored in the VeeamSupportLogs subfolder of the specified $logFolder.
  3. After running the script, attach the two generated zip files to the Veeam Support case for review.
    Note: The log bundle generated by Veeam Backup & Replication must remain separate and attached to the case individually.

 

Using ProcDump as a Postmortem Debugger

In situations where a process related to Veeam operations crashes unexpectedly, ProcDump can be configured to act as the postmortem debugger, allowing for the capture of data that can help Veeam Support investigate the process crash.

Install ProcDump as the (AeDebug) postmortem debugger:

procdump -ma -i c:\dumps
Uninstall ProcDump as the (AeDebug) postmortem debugger:
procdump -u
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.