| name | description |
|---|---|
frate |
Monitor file growth rate with EMA smoothing. Use when you need to watch how fast a file is growing. |
Monitor how fast a file is growing. Prints file size and EMA-smoothed growth rates over 10s, 1m, and 5m windows.
go install github.com/hayeah/frate@latestfrate <file>Polls every 5 seconds, one line per update to stderr.
Output format:
<size> 10s <rate> 1m <rate> 5m <rate>
# Watch a log file grow
frate /var/log/app.log
# Monitor a database dump in progress
pg_dump mydb > dump.sql & frate dump.sql
# Track a large download
frate ~/Downloads/bigfile.zip
# Pipe-friendly: frate writes to stderr, so stdout is free
frate data.csv 2>rate.log12.3 MB 10s 1.5 MB/s 1m 1.2 MB/s 5m 1.1 MB/s
14.1 MB 10s 1.4 MB/s 1m 1.3 MB/s 5m 1.1 MB/s
- 10s — reacts quickly to rate changes
- 1m — smoothed over ~1 minute
- 5m — long-term trend
All rates use time-based EMA: alpha = 1 - exp(-dt/window). This adapts correctly regardless of actual polling jitter.
- Output goes to stderr, not stdout.
- When the file isn't growing, all rates decay toward 0 B/s (they don't snap to zero instantly — that's the EMA smoothing).
- If the file shrinks (e.g. truncation), the rate goes negative.
- No external dependencies — just Go stdlib.