Skip to content

Commit b9b108c

Browse files
benhillisBen Hillis
andauthored
tracing: combine collect-wsl-logs.ps1 and collect-networking-logs.ps1 (#14089)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
1 parent e663585 commit b9b108c

File tree

5 files changed

+154
-327
lines changed

5 files changed

+154
-327
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ debugConsole=true
196196
### Common Debugging Commands
197197
- Debug shell: `wsl --debug-shell`
198198
- Collect WSL logs: `powershell diagnostics\collect-wsl-logs.ps1`
199-
- Network logs: `powershell diagnostics\collect-networking-logs.ps1`
199+
- Network logs: `powershell diagnostics\collect-wsl-logs.ps1 -LogProfile networking`
200200

201201
## Critical Timing and Timeout Guidelines
202202

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,18 @@ Install [WPR](https://learn.microsoft.com/windows-hardware/test/wpt/windows-perf
5353
To collect WSL networking logs, do the following steps in an administrative powershell prompt:
5454

5555
```
56-
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-networking-logs.ps1" -OutFile collect-networking-logs.ps1
56+
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
5757
Set-ExecutionPolicy Bypass -Scope Process -Force
58-
.\collect-networking-logs.ps1
58+
.\collect-wsl-logs.ps1 -LogProfile networking
5959
```
6060
The script will output when log collection starts. Reproduce the problem, then press any key to stop the log collection.
6161
The script will output the path of the log file once done.
6262

63+
For additional network creation logs (restarts WSL), use:
64+
```
65+
.\collect-wsl-logs.ps1 -LogProfile networking -RestartWslReproMode
66+
```
67+
6368
<!-- Preserving anchors -->
6469
<div id="8-detailed-logs"></div>
6570
<div id="9-networking-logs"></div>
@@ -81,9 +86,9 @@ The script will output the path of the log file once done.
8186

8287
For specific scenarios, you can use different log profiles:
8388
- `.\collect-wsl-logs.ps1 -LogProfile storage` - Enhanced storage tracing
84-
- `.\collect-wsl-logs.ps1 -LogProfile networking` - Networking-focused tracing
89+
- `.\collect-wsl-logs.ps1 -LogProfile networking` - Comprehensive networking tracing (includes packet capture, tcpdump, etc.)
90+
- `.\collect-wsl-logs.ps1 -LogProfile networking -RestartWslReproMode` - Networking tracing with WSL restart for network creation logs
8591
- `.\collect-wsl-logs.ps1 -LogProfile hvsocket` - HvSocket-specific tracing
86-
- `.\collect-networking-logs.ps1` - Alternative script for networking tracing
8792

8893
### 10) Reporting a Windows crash (BSOD)
8994

diagnostics/collect-networking-logs.ps1

Lines changed: 0 additions & 320 deletions
This file was deleted.

0 commit comments

Comments
 (0)