A Rust Toolkit for High-Scale Filesystem Analytics
Dutopia turns massive filesystems into fast, filterable, UTF-8 clean analytics.
It is modular — use only the components you need.
- duscan — high-performance scanner that traverses the filesystem with concurrency and streams metadata for both files and directories.
- duhuman — converts machine data (epochs, uids/gids, mode bits) into human fields (local dates, usernames, octal perms).
- dusum — reads
duscanoutput and produces rollups by folder, user, and file-age buckets. - dudb — builds the SQLite database from
dusumoutput; with--rawit also indexes each folder's files (totals of all of them, listing the 100 largest of at least 1 MB per folder, owner and age by default) so listings need no filesystem access. - duzip — compresses/expands CSV ↔ Zstandard (
.zst) binary streams. - duapi — lightweight REST API server exposing aggregated data.
- duxray — one-pass statistics over a
duscanCSV: size distribution, age and abandonment by owner and project, junk files, permission red flags.
Frontend: Svelte SPA (for dashboards and visualization).
- Multi-threaded Rust scanner with near-line-rate performance.
- Output as CSV or binary (Zstandard optional).
- UTF-8 safe, cross-platform (Linux, macOS, Windows).
- Scales to billions of files (tested on >1B files, 30PB storage).
- Aggregated indices for instant dashboard queries.
- Works standalone or as a full pipeline.
Scanner output (CSV):
INODE,ATIME,MTIME,UID,GID,MODE,SIZE,DISK,PATH
Columns:
- INODE — device identifier + inode (Linux)
- ATIME — last access time (epoch seconds)
- MTIME — last modified time (epoch seconds)
- UID — user ID
- GID — group ID
- MODE — file type + permissions (octal)
- SIZE — logical size in bytes
- DISK — disk usage (blocks × 512)
- PATH — full path (UTF-8 safe)
Clone and build with Cargo:
git clone https://github.com/sganis/dutopia.git
cd dutopia
cargo build --releaseBinaries are under target/release/:
duscanduhumandusumdudbduzipduapiduxray
./duscan /home -o home.csv./duhuman home.csv -o home.human.csv./dusum home.csv -o home.sum.csv# folder-level stats only
./dudb home.sum.csv -o home.db
# also index every file, so /api/files is served from the DB
# (required in production where the API host cannot see the filesystem;
# run on a host that resolves the same uid→username mapping as dusum)
./dudb home.sum.csv --raw home.csv -o home.dbThe file index costs ~52 bytes per file; the resulting DB is roughly half the size of the raw scan CSV (e.g. a 50 GB scan builds a ~23 GB DB).
# compress CSV → Zstd
./duzip home.csv -o home.zst
# decompress Zstd → CSV
./duzip home.zst -o home.csv./duapi home.db --port 8000Open the Svelte frontend in your browser to explore results.
On-prem OpenShift: build on a Linux host, package into a thin image, push, apply. Full runbook in deploy/README.md.
./deploy/build-linux.sh # on the Linux host
podman build -f deploy/Dockerfile -t <registry>/duapi:<v> .
oc apply -f deploy/openshift/duapi.yamlFork and submit PRs:
git clone https://github.com/sganis/dutopia.git