A tray-resident Windows disk monitor that answers three questions:
- What is eating my C: drive? — per-folder sizes, 20 categories, treemap
- What is growing right now? — the NTFS USN journal reports which file changed, once a second. The byte count is a size sample taken right after — a USN record carries no size field, so writes that coalesce inside one open→close window are reported as one change, not many.
- What can I safely delete? — every cleanup goes to a quarantine you can undo for 7 days
Monitoring is read-only by default. Nothing is deleted without an explicit click, and every destructive action is reversible (quarantine) except one clearly-labelled auto-clean rule, which needs three confirmations.
Note on data safety — this tool moves files into a quarantine folder, and its L2 "auto-clean" rules can permanently delete files. Read SECURITY.md before enabling rules.
A move is not an erase. Quarantine is a logical delete: the file leaves its old path, sits in the quarantine folder, and 7 days later is unlinked from the file system — nothing overwrites its bytes. On both magnetic and solid-state media, overwriting does not reliably destroy what was there (Gutmann, USENIX Security '96; Wei et al., FAST '11), so read "deleted" here as "no longer reachable", never as "unrecoverable". If you need data to be gone, this is not that tool.
| Overview | Cleanup center |
|---|---|
![]() |
![]() |
| Space treemap | Quarantine — a move, not an erase |
|---|---|
![]() |
![]() |
| English UI | Lazy clean preview |
|---|---|
![]() |
![]() |
Screenshots use a synthetic demo folder (
E:\diskmon-demo) so no personal paths are exposed.
| Area | What you get |
|---|---|
| Monitoring | free space, 3-level thresholds, daily auto-scan, growth forecast, live scan progress (cancellable), 3-way parallel scan, incremental rescan (clean subtrees reused), instant rescan when nothing changed |
| Attribution | USN journal (1 s) for which file; byte counts come from a post-event size sample; per-process write I/O (approx.); jump vs leak detection |
| Size accounting | both "sum over paths" and "after hardlink dedup"; dedup probe covers files ≥8 MB and the report says so — it is a lower bound |
| Analysis | 20 categories, treemap, snapshot diff (vs last / 7 days ago), app aggregation |
| Media split | images / video / documents / audio / archives / programs, per folder |
| Duplicates | two-stage hash, hardlink-aware, never touches install directories |
| Leftovers | registry orphans + leftover app data, confidence-labelled |
| Cleanup | one-click "lazy clean" (pausable / resumable / stoppable, manual or scheduled daily/weekly), 3 tiers, per-app, per-folder, media-by-type, L2 rules |
| Safety | quarantine (7 days, size cap), whitelist/blocklist, dry-run first, undo; results are reconciled per folder as planned / actual / difference |
| Ops | single 8 MB exe, tray, /api/health, watchdog, signed builds |
| Export | CSV for dirs / files / apps / duplicates / media / alerts / quarantine |
| UI | 6 top-level pages, cleanup tabs, every table sortable + searchable, path inspection, English/Chinese UI |
- Download
diskmon-setup.exefrom Releases. - Windows SmartScreen may warn (builds are self-signed): More info → Run anyway.
- Accept UAC, answer the two prompts (Defender exclusion / trust the self-signed cert are optional).
- A tray icon appears and a 磁盘监测 shortcut is created on the desktop.
Put diskmon-go.exe anywhere and run it. It starts in the tray; open the dashboard with
diskmon-go.exe open or from the tray menu.
- Open the dashboard → click Scan (first scan takes 1–2 minutes).
- Read the Today's suggestion card.
- Click Lazy clean — it only touches temp/dev/update caches, everything is undoable.
Release binaries are self-signed today; docs/SIGNING.md documents the free SignPath Foundation path for publicly trusted signing.
Grab diskmon-go.exe (or the portable zip) from the latest release. Every release also ships SHA256SUMS.txt:
`powershell Get-FileHash .\diskmon-go.exe -Algorithm SHA256
`
SmartScreen: builds are self-signed for now, so Windows may show "Unknown publisher". Choose More info -> Run anyway, or build from source (one command, see below) if you prefer. A publicly trusted signature is prepared for (docs/SIGNING.md) once the project has real users.
It happens, and it is not a sign that something is wrong. An unsigned Go binary that is new, has
few installs, and launches built-in Windows tools (powershell.exe for uninstall/leftover queries,
dism.exe for the component store, explorer.exe to open folders) matches the shape of what
machine-learning heuristics look for. We have had our own builds quarantined this way during
development — one engine called it Trojan:Win32/Bearfoos.A!ml, where the !ml suffix means the
verdict came from a model, not a known signature.
What that verdict does not mean: the binary is not packed, it makes no network calls of its own, and the source is right here in this repository.
If it gets quarantined, in order:
- Verify it first. Compare
Get-FileHash .\diskmon-go.exe -Algorithm SHA256againstSHA256SUMS.txtfrom the same release page. If it does not match, delete it — you got a bad download, and the warning was right. - If it matches, restore it from quarantine and add an allow entry, or simply build from source (one command, see below) so nothing is downloaded at all.
- Report the false positive to Microsoft at https://www.microsoft.com/en-us/wdsi/filesubmission ("I believe this file is incorrectly detected as malware"). Third-party engines usually pick the file up once the big engine stops calling it, so a report helps the next person more than it helps you.
Please do not disable your antivirus to run this. If you are not comfortable with the verdict, build from source instead — that is the whole point of shipping a single-file, zero-dependency Go program with no network code in it.
powershell scoop bucket add pyc https://github.com/pyc123720/scoop-bucket scoop install diskmon
Requirements: Windows 10/11, Go 1.27+, no third-party dependencies.
./build.ps1 # vet + test + build -> dist/diskmon-go.exe
./build.ps1 -Installer # also build dist/diskmon-setup.exe (needs a payload, see below)The installer embeds a pre-built exe, so it needs installer/payload/ to be populated first —
build.ps1 -Installer does that automatically (a self-signed .cer is optional).
Tests: go test ./... — 20 cases (quarantine, rule guard, scan progress, lazy clean, security).
CI runs go vet, go test and the build on windows-latest.
diskmon-go.exe tray # tray app (default for releases)
diskmon-go.exe open # open the app window
diskmon-go.exe scan # scan the configured root, print summary
diskmon-go.exe report # write an HTML report
diskmon-go.exe serve # serve the dashboard only
diskmon-go.exe status # one-line status
diskmon-go.exe health # version / uptime / goroutines / counters
diskmon-go.exe diag # write a diagnostics bundle (run this before filing a bug)
diskmon-go.exe dup C:\ 4 # duplicate-file scan (min size in MB)
diskmon-go.exe leftovers # uninstall leftovers scan
diskmon-go.exe plans # preview the 3 cleanup tiers
diskmon-go.exe rules # list L2 rules
diskmon-go.exe mcp # MCP server over stdio (for DSH / other agents)
diskmon-go.exe mcp runs an MCP server on stdio (newline-delimited JSON-RPC, protocol 2024-11-05).
Tools exposed:
| Tool | Kind |
|---|---|
diskmon_status |
read-only: capacity, free space, last scan |
diskmon_health |
read-only: version, uptime, data dir |
diskmon_alerts |
read-only: recent alerts |
diskmon_inspect |
read-only: size / category / tier / locks for a path |
diskmon_plans |
read-only: preview of the three cleanup tiers |
diskmon_quarantine_list |
read-only: current quarantine entries |
diskmon_clean_lazy |
reversible: run one conservative cleanup (quarantine) |
diskmon_restore |
reversible: restore one quarantine entry |
Not exposed on purpose: permanent deletion (rule-run, purge). Which tools a client may call,
how often, and with what thresholds is the integrator's policy — this project only provides the entry.
Register it in any MCP client as a stdio server:
{
"mcpServers": {
"diskmon": {
"command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\diskmon\\diskmon-go.exe",
"args": ["mcp"]
}
}
}In DSH: Settings → MCP → add a stdio server with the command above and argument mcp.
Write-type tools talk to the running tray over http://127.0.0.1:8766; start the tray first.
http://127.0.0.1:8766/ (port configurable) — bound to loopback only.
| Page | Purpose |
|---|---|
/ |
free space, today's suggestion, lazy clean, shortcuts |
/clean |
tiers, per-app, duplicates, leftovers, quarantine, history |
/trend |
forecast, daily growth, anomaly classification, diff |
/detail (and /detail/<section>) |
everything, plus 20 focus pages |
/media |
images / video / docs / audio / archives per folder |
/rules |
create/edit/delete L2 rules, dry-run and run-now buttons |
/settings |
thresholds, whitelist, quarantine size, notification rules |
- Monitoring never writes to scanned paths.
- All cleanups move files to
<data-dir>/quarantine— restore for 7 days, size cap 20 GB. - Only the
cleantier (temp / dev cache / update cache / logs) is eligible for automatic rules. - Rules are dry-run by default and require three confirmations to delete permanently.
- A hard deny-list (
AppData\Local\Packages,Microsoft\Windows,WindowsApps, …) is never touched.
- One drive at a time. Defaults to
C:\; change "scan root" in settings to monitor another drive (USN attribution follows it). Multi-drive scanning is planned, not implemented. - Windows only. Some features need administrator rights (USN, process I/O).
- Process attribution is approximate: it reports who writes how much, not who wrote which file.
- Builds are self-signed, so SmartScreen still warns on other machines unless you trust the bundled cert.
No telemetry, no network calls except the timestamp server used when signing a build.
All data stays in %LOCALAPPDATA%\diskmon-go (or the configured data directory).
Single maintainer, limited hours, but the process is explicit:
- Before filing a bug, run
diskmon-go.exe diagand paste the generateddiag-<timestamp>.txt. It contains version, OS, config, last-scan summary, alerts and the log tail — one round instead of four. - Check docs/FAQ.md first: SmartScreen warnings, "I cleaned 4 GB but free space didn't move" (quarantine lives on the same volume and is only released when purged), "planned 4 GB but only 12 MB" (files were locked), why process attribution is approximate, and so on.
- Response cadence, label meanings and close policy are in docs/TRIAGE.md: I usually look once a week (evenings + weekends), ordered by data safety > crashes > wrong results > UX.
- Inactive issues labelled
needs-infoare nudged and then closed by GitHub Actions; add the missing details and reopen at any time.
Issues and PRs are welcome. Please keep the safety model intact: read-only monitoring, quarantine-first cleanup, dry-run before real deletion.
MIT © 2026 pyc123720 — see LICENSE.





