microsoft / microsoft/WSL

collect-wsl-logs.ps1 should warn users when a required tool is not installed

Open
#14,427 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**
WSL developers need complete logs in order to investigate issues. Certain logs can only be collected when proper tools are installed on Linux.
It's common for people to miss these details when reading the documentation. Others don't read docs at all. This can result in incomplete logs and prevent issues from being root caused.

**Describe the solution you'd like**
It would be very useful for the script that collects the logs to check if the required tools are installed and write a clear warning in case some are missing, making it clear to the user that they should seriously consider installing the tool.

**Describe alternatives you've considered**
An alternative considered would be failing the script's execution when a tool is missing, but that is probably too drastic.
There might be a legitimate reason for the tool to not be installed, and blocking the collection of the other logs would arguably be worse.

**Additional context**
Suggested warnings:
WARNING: tcpdump not found on WSL. For a more complete log collection install tcpdump.
WARNING: iptables not found on WSL. For a more complete log collection install iptables.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading and running collect-wsl-logs.ps1 to see how Linux tools are currently used during collection. Check the tcpdump and iptables paths, then verify that missing tools produce clear warnings while the remaining logs are still collected. Done means users are warned about each missing required tool without the script failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
operating-systems, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.