MooseFS monitoring — CLI, web GUI and metrics exporter in one static C binary. Everything the stock tools do, plus file & chunk inspection they don't have, with none of the runtime tax.
The stock MooseFS diagnostic tools are written in Python
(mfscli.py) and the dashboard is a C + Python CGI (mfsgui.c,
chart.cgi). The Go port already collapsed all of that into a single
executable — but paid a fixed ~7 MB for the Go runtime, GC and reflection.
mfscli-c keeps every feature and sheds that tax: a ~535 KB static binary,
no runtime at all, in the same language as MooseFS itself.
scp mfscli node: && ./mfscliA faithful C reimplementation of the Go port — every CLI section, the web GUI and the metrics exporter — verified field-for-field against a live MooseFS 4.x master (110/110 checks identical) — and then a few things the stock Python dashboard doesn't have at all.
~535 KB, statically linked against musl. HTML and fonts are embedded
(xxd-style): copy it and run, even on a bare initrd.
All 18 -S sections (info, chunkservers, disks, storage classes,
mounts…), threshold colors, box-drawing frames (-f 0..3),
sorting and filtering.
-j emits structured JSON for scripts and dashboards — byte-compatible
with the Go encoder (ordered keys, shortest-float).
-SHE gives a concise health summary; --check returns a
Nagios-style status and exit code.
--serve ships a minimal HTTP server with embedded assets: charts
drawn client-side, sortable/filterable tables, an Operations tab, a
File info search box and
/data.json /fileinfo.json /findfile.json /chartdata.json /influx endpoints.
--export influx emits line-protocol to feed Telegraf →
InfluxDB/TimescaleDB → Grafana.
--fileinfo resolves a file to its chunks and the on-disk path of every
copy or EC part — like mfsfileinfo -p, but without a mounted
client: it talks to the master and chunkservers directly. Copies and
erasure-coding parts, in the CLI and in the GUI.
--findfile walks the whole MFS tree for a file by name — exact,
case-insensitive, or with shell wildcards (picture_22*) — and prints
its path; in the web GUI a search box lists the matches and jumps straight to their chunks
and disk locations.
Same host, same output as the Go port — from a binary that
ldd calls “not a dynamic executable” and weighs 535 KB.
Cluster summary, health, JSON and a Nagios check, all dependency-free.
Recorded live against a real MooseFS 4.x master.
--serve)The same self-contained dashboard, now served by a tiny hand-written HTTP server in C: tabbed navigation, sortable and filterable tables, client-side charts with selectable ranges, light/dark theme and text scaling.
Status, Chunkservers, Disks, Storage classes, the File info tab — searching a file by name, then resolving its chunks and on-disk paths (including erasure-coding parts) — and Charts. Assets (HTML + 2 woff2) are embedded in the binary.
The ~7 MB of the Go build are not the assets (those are only
~103 KB) — they are the Go runtime, GC, reflection and net/http. C has
no runtime, so that fixed tax simply disappears.
| Build | Size | What's inside |
|---|---|---|
| Go, shipped | 6.93 MB | runtime + GC + reflection (json) + net/http |
| C, static musl, stripped | 535 KB | code + embedded assets (~103 KB) + musl static |
| ↳ of which embedded assets | ~103 KB | gui_index.html + 2× woff2 — identical in both |
| C, dynamic musl, stripped | ~0.25 MB | shared libc (if you prefer dynamic) |
Go build measured June 2026, C build 0.1.0 November 2026. Same features, ~13× smaller, zero runtime — and in the same language as MooseFS upstream.
# cluster summary, colored
mfscli -H mfsmaster -SIG
# health summary + chunkservers
mfscli -SHE ; mfscli -SCS
# JSON for automation
mfscli -j -SIG | jq .
# Nagios-style check
mfscli --check # -> exit code 0/1/2
# built-in web GUI
mfscli --serve :9425 # http://host:9425/
# metrics exporter for Telegraf/Grafana
mfscli --export influx
# where are a file's chunks? copies & EC parts, no mount needed
mfscli -H mfsmaster --fileinfo /data/big.bin
# find a file by name across the whole MFS tree
mfscli --findfile big.bin
# build it yourself: one static, stripped binary
make # -> mfscli, ~535 KB, musl, no dependencies
Version 0.1.0 (November 2026). Free software under the GNU GPL v2: binary and complete source code.
| File | Size | What it is |
|---|---|---|
| mfscli-linux-amd64 | 535 KB | static binary for x86-64 Linux: download, chmod +x, run |
| mfscli-c-0.1.0.tar.gz | 302 KB | source code: make builds the same binary (needs musl-gcc; make CC=gcc LDFLAGS=-s for a dynamic build) |
| SHA256SUMS | checksums: sha256sum -c SHA256SUMS |