Repository

ideaconnect/wsl-tray

wsl-tray

Open github.com

ideaconnect/wsl-tray

wsl-tray

Windows tray indicator for WSL2 VM status, CPU/memory usage, and one-click shutdown. Written in Rust using windows-sys. 282 KB executable, ~4 MB private memory.

Visit project

Show me a random project

First shared
Sep 16, 2026
HN activity
20

Show HN@bpacholekSep 16, 2026

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

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.

Community

Hacker News discussion

Loading the thread…