Skip to content

About

Tiny Windows 11 taskbar monitor for RAM, CPU, GPU and disk that splits usage between Windows and WSL2 / Docker (VmmemWSL). Rust + Win32, ~3.5 MB RAM.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

StatsOverlay

CI

A tiny RAM / CPU / GPU / disk monitor inside the Windows 11 taskbar, that also tells you how much of it is Windows and how much is WSL.

StatsOverlay is a tiny readout that lives inside the Windows 11 taskbar (or as a tray icon). It's a general system monitor, and it works without WSL. If you use WSL 2 or Docker Desktop, it splits memory and disk between Windows and the WSL VM, so you can see at a glance when VmmemWSL is eating your machine.

Also known as: WSL taskbar monitor, vmmem / VmmemWSL memory monitor, Windows 11 taskbar RAM monitor, taskbar system stats.

Grid layout

Bars layout

Hover it for the full breakdown:

Hover panel

  • Small. One ~0.5 MB portable .exe, ~3.5 MB of RAM (measured), about 0% CPU at idle. Plain Win32 + Direct2D, no GUI framework, no runtime, no service.
  • Embedded. A layered child window of the taskbar, so it moves, hides and auto-hides with it. It falls back to a small always-on-top strip if embedding fails.
  • Honest WSL numbers. It counts the VM's memory that Windows has compressed, which Task Manager's VmmemWSL row leaves out (see below).
  • Never wakes WSL. It only calls wsl.exe while the VM is already running, and polls inside distros rarely enough that it never keeps an idle distro alive.

What it shows

WIN / WSL RAM used by Windows vs. the WSL VM. They add up to ALL (Task Manager's "In use"). Without WSL, WSL shows "off" and WIN is everything.
CMT Commit charge: committed / commit limit. Running out of commit, not RAM, is what makes allocations fail, and the VM can push it high.
CPU / GPU Task Manager-style CPU utilization and busiest GPU engine (+ dedicated VRAM in the panel).
C: Drive used / total. In the panel, "Windows" is what's left after subtracting WSL's virtual disks.
VHD Space taken on disk by every WSL 2 distro's ext4.vhdx and Docker Desktop's data disk. ↓ is space Linux has freed inside them that the file still holds (reclaimable by compacting, or automatically with sparse disks).

Values turn yellow at 80% and red at 90%.

Device batteries (optional)

Right-click > Display > Device batteries > Show device batteries adds the battery level of wireless mice, keyboards and headsets to the strip and the hover panel: name, %, a bolt while charging or plugged in, and how it's connected (a receiver dongle or the Bluetooth logo). It's off by default; while off, nothing is polled and no device is opened.

  • Logitech devices on a Unifying, Bolt or Lightspeed receiver, on Bluetooth or on a cable, read over HID++ 2.0 (UNIFIED_BATTERY, else BATTERY_STATUS) once a minute. A device that's asleep keeps its last reading, dimmed. It works next to G HUB and Logi Options+.
  • Any Bluetooth device Windows shows a battery level for in Settings > Bluetooth & devices (earbuds, headsets, controllers): the level only, no charging state, and only while it's connected.

Each device found gets a tick in the same submenu, to hide it. Yellow from 20% down, red from 10%. Builds made with --no-default-features leave all of this out.

Why the WSL figure is bigger than Task Manager's VmmemWSL

Windows compresses the VM's idle memory and moves it into the Memory Compression process, so VmmemWSL's working set alone undercounts WSL. On a 64 GB machine we saw 10 GB resident plus 15 GB compressed. StatsOverlay counts:

WSL = VM working set + min(compression store, VM private − VM working set)
WIN = in use − WSL

Per-process figures come from NtQuerySystemInformation, the same source Task Manager uses.

Layouts and settings

Right-click the strip:

  • Display: show in the taskbar, as a tray icon, or both. The strip, the hover panel and the tray icon each have their own settings:
    • Taskbar strip: the layout, and which of CPU, GPU, commit and disk it shows.
      • Grid: two lines per metric (shown above).
      • Windows / WSL rows: one row each, with RAM, disk and CPU side by side.
      • Bars: one column per resource, with a bar split Windows (blue) / WSL (orange).
      • Compact: just WIN and WSL memory.
    • Hover panel: the style, and its own CPU / GPU / commit / disk toggles.
      • Sections: every detail, grouped into Memory, WSL, Disk and CPU · GPU.
      • Bars: a Windows / WSL bar per resource, with a legend.
      • Tiles: big numbers, three per row.
      • History: each value next to a graph of the last minute.
      • Insights: a one-line summary, then only what needs attention and why.
    • Tray icon: two small bars, RAM (Windows / WSL) and a second one you pick (commit, system drive, CPU, or none). Hover for the panel, right-click for the menu. "Keep visible" pins it next to the clock instead of under ^ (the same switch as Settings > Personalization > Taskbar > Other system tray icons).
  • WSL settings: edits %USERPROFILE%\.wslconfig in place (other lines and comments are kept; the original is backed up once to .wslconfig.statsoverlay-backup):
    • autoMemoryReclaim: gradual / dropCache / disabled / not set
    • VM memory limit ([wsl2] memory): default, presets, or a custom value
    • It offers to restart WSL so the change applies.
    • Open .wslconfig in Notepad, or the WSL Settings app when it's installed.
  • Reclaim WSL cache: drops Linux's page cache, so the VM can hand memory back.
  • Shut down WSL…: wsl --shutdown, after asking.
  • Start with Windows, Open Task Manager, Exit.

Left-click opens Task Manager. Display settings are stored under HKCU\Software\StatsOverlay.

Install

Download statsoverlay.exe from Releases and run it. To start it with Windows, use right-click > Start with Windows. To remove it: untick that, Exit, and delete the exe (and optionally HKCU\Software\StatsOverlay).

Build from source

Rust with the MSVC toolchain (the default on Windows) and the Visual Studio Build Tools (C++ workload):

cargo build --release

Output: target\release\statsoverlay.exe. --no-default-features builds it without the device batteries code (about 35 KB smaller). Cross-compiling with --target x86_64-pc-windows-gnu also works (needs MinGW's windres).

Releasing

CI (.github/workflows/ci.yml) checks formatting, runs clippy and the tests, and builds on every push and pull request; the exe is attached to each run. To publish a release, bump version in Cargo.toml, then tag and push:

git tag v0.3.1
git push origin v0.3.1

release.yml builds it and creates the GitHub release with statsoverlay.exe and its SHA-256.

Command line

Option
--popup Use the always-on-top strip instead of embedding in the taskbar.
--offset N Left offset in logical px (default: after the Widgets button).
--diag Write statsoverlay-diag.txt (taskbar layout, memory accounting, distros, disks, .wslconfig) and open it.

Compatibility

  • Windows 11 taskbar, centered or left-aligned icons. Light and dark themes, any DPI.
  • A taskbar moved to the top (ExplorerPatcher, StartAllBack) works; the panel and menu open downwards.
  • Only the main monitor's taskbar for now. Vertical (left/right) taskbars aren't supported yet.
  • WSL 2 (WSL 1 distros have no VM or virtual disk). Docker Desktop's WSL backend is detected.

How it compares

Similar tools exist, but none we found combine these:

  • TrafficMonitor: mature, taskbar-embedded CPU/RAM/network monitor, but no WSL view.
  • wsl-tray and its forks: a tray icon with WSL on/off, CPU and memory, and shutdown.
  • wsl-dashboard: a GUI for managing WSL distros.
  • wsl2compact and wsldisk: scripts for compacting WSL virtual disks.

StatsOverlay sits in the taskbar like TrafficMonitor, but it's about the Windows vs. WSL split: compressed VM memory, commit, and virtual disk space.

Source layout

File Role
src/main.rs Windows, message loop, placement, menus
src/sampler.rs Sampler thread: memory, VM and compression accounting, WSL and disk polling
src/procs.rs Per-process memory and CPU via NtQuerySystemInformation
src/metrics.rs CPU (system times × clock), GPU and VRAM (D3DKMTQueryStatistics), commit charge
src/disk.rs Drives and WSL/Docker VHDX sizes
src/wsl.rs wsl.exe calls, only while the VM and a distro are already running
src/wslconfig.rs Reading and editing .wslconfig
src/config.rs Display settings in the registry
src/prompt.rs The custom memory limit dialog (in-memory dialog template)
src/render.rs Direct2D/DirectWrite into a premultiplied DIB, UpdateLayeredWindow
src/taskbar.rs Finding the taskbar, alignment, Widgets button, top/bottom
src/theme.rs Light/dark, colors
src/tray.rs Tray-icon mode: icon drawing, tooltip, anchor for the panel
src/battery/ Device batteries (feature batteries): polling thread, Logitech HID++ (hidpp.rs), Bluetooth battery property (bluetooth.rs)
src/startup.rs Start with Windows (HKCU Run key)
src/diag.rs --diag report
build.rs, app.manifest, app.rc Embeds the manifest (DPI awareness, Windows 10/11 compatibility)

Test checklists per milestone are in docs/.

About

Tiny Windows 11 taskbar monitor for RAM, CPU, GPU and disk that splits usage between Windows and WSL2 / Docker (VmmemWSL). Rust + Win32, ~3.5 MB RAM.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages