Skip to content

Commit

Permalink
Add more containerd logs (#4398)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiashok authored Jul 8, 2024
1 parent 390ee1f commit fd3ad31
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions staging/cse/windows/debug/collect-windows-logs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ else {
$res = Get-Command shimdiag.exe -ErrorAction SilentlyContinue
if ($res) {
Write-Host "Collecting logs of runhcs shim diagnostic tool"
shimdiag.exe list --pids > "$ENV:TEMP\$timeStamp-shimdiag-list-with-pids.txt"
$paths += "$ENV:TEMP\$timeStamp-shimdiag-list-with-pids.txt"

$tempShimdiagFile = Join-Path ([System.IO.Path]::GetTempPath()) ("shimdiag.txt")
$shimdiagList = shimdiag.exe list
Set-Content -Path $tempShimdiagFile -Value $shimdiagList
Expand All @@ -295,6 +298,17 @@ else {
Write-Host "shimdiag.exe command not available"
}

# run hcsdiag list
$res = Get-Command hcsdiag.exe -ErrorAction SilentlyContinue
if ($res) {
Write-Host "Collecting logs from hcsdiag tool"
hcsdiag.exe list > "$ENV:TEMP\$timeStamp-hcsdiag-list.txt"
$paths += "$ENV:TEMP\$timeStamp-hcsdiag-list.txt"
}
else {
Write-Host "hcsdiag.exe command not available"
}

# log containerd info
$res = Get-Command containerd.exe -ErrorAction SilentlyContinue
if ($res) {
Expand Down

0 comments on commit fd3ad31

Please sign in to comment.