Expand description
System-wide bandwidth estimation.
Reads network interface byte counters and computes RX/TX rates.
- Linux: parses
/proc/net/dev - macOS: parses
netstat -ib
The first sample has no delta, so the rate is None.
Structs§
- Bandwidth
Rate - Bandwidth measurement: bytes per second for RX and TX.
- Bandwidth
Tracker - Tracks bandwidth by sampling byte counters.
Functions§
- format_
rate - Format bytes/sec as human-readable string (e.g. “1.2 MB/s”).