cd /news/developer-tools/show-hn-tray-indicator-for-wsl2-on-o… · home topics developer-tools article
[ARTICLE · art-131326] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: Tray indicator for WSL2: on/off, CPU and memory, one-click shutdown

A developer released a BSD 3-Clause licensed Rust tray tool for Windows 11 that turns WSL2 on and off with one click and displays the virtual machine's CPU and memory usage, avoiding the need to run wsl --shutdown. The tool detects the VM by the presence of the vmmemWSL process and reads CPU and memory via NtQuerySystemInformation(SystemProcessInformation), since vmmemWSL runs as SYSTEM and denies OpenProcess to normal users; a snapshot of roughly 250 processes takes 3.8 ms. The 282 KB executable uses 3.9 MB of private memory after half an hour, one thread while idle, and a 10 to 19 MB working set, with older Windows 10 builds reporting the process as vmmem and requiring a -process flag.

read1 min views1 publishedSep 16, 2026

When using my PC for private stuff like gaming or video editing I wanted an direct way (without calling wsl --shutdown) of turning WSL2 off. Created (with a help of Claude, it is 2026...) a small tray tool which barely uses resources and provides also resources usage info.

Grey means the VM is off. Green, orange or red means it is running, coloured by the higher of its CPU and memory share of the machine. Hover for the numbers, menu entry to shut it down.

Two things that were not obvious: * Presence is the vmmemWSL process existing. WSL reports on distributions, not on the VM. * CPU and memory come from NtQuerySystemInformation(SystemProcessInformation). vmmemWSL runs as SYSTEM, so OpenProcess is denied to a normal user and GetProcessTimes is out. A snapshot of ~250 processes takes 3.8 ms and needs no handle.

Rust, windows-sys only. 282 KB exe, 3.9 MB private memory after half an hour, one thread while idle. Working set is 10 to 19 MB, mostly shared DLLs.

Targeted for Windows 11. Older Win10 builds call it vmmem (Use -process flag). Shutdown asks for confirmation. BSD 3-Clause.

Comments URL: [https://news.ycombinator.com/item?id=49724577](https://news.ycombinator.com/item?id=49724577)

Points: 1

── more in #developer-tools 4 stories · sorted by recency
── more on @wsl2 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-tray-indicat…] indexed:0 read:1min 2026-09-16 ·