| Crates.io | netwatch-rs |
| lib.rs | netwatch-rs |
| version | 0.2.0 |
| created_at | 2025-07-27 21:57:02.86133+00 |
| updated_at | 2025-07-27 21:57:02.86133+00 |
| description | A modern network traffic monitor for Unix systems, inspired by nload but written in Rust |
| homepage | https://github.com/vietcgi/netwatch |
| repository | https://github.com/vietcgi/netwatch |
| max_upload_size | |
| id | 1770460 |
| size | 834,686 |
A modern network traffic monitor for Unix systems, inspired by nload but written in Rust with enhanced features and beautiful terminal interfaces.
# Install latest version
curl -sSL https://raw.githubusercontent.com/vietcgi/netwatch/main/install.sh | bash
# Or with wget
wget -qO- https://raw.githubusercontent.com/vietcgi/netwatch/main/install.sh | bash
# Install to custom directory
INSTALL_DIR=~/.local/bin curl -sSL https://raw.githubusercontent.com/vietcgi/netwatch/main/install.sh | bash
# Rust/Cargo
cargo install netwatch-rs
# Homebrew (macOS)
brew install netwatch
# Docker
docker run --rm -it --net=host ghcr.io/vietcgi/netwatch:latest
Download pre-built binaries from the Releases page for:
git clone https://github.com/vietcgi/netwatch
cd netwatch
cargo install --path .
# Auto-detect and monitor default interface
netwatch
# List available interfaces
netwatch --list
# Monitor specific interface
netwatch en0
# SRE forensics dashboard mode
netwatch --sre-terminal
# Simple overview mode
netwatch --show-overview
# Monitor multiple interfaces
netwatch -m
Advanced network forensics interface with:
Clean, minimal interface showing:
Monitor multiple interfaces with:
-l, --list List available network interfaces
-a, --average <seconds> Average window length [default: 300]
-i, --incoming <kBit/s> Max incoming bandwidth scale (0 = auto)
-o, --outgoing <kBit/s> Max outgoing bandwidth scale (0 = auto)
-t, --interval <ms> Refresh interval in milliseconds [default: 1000]
--high-perf Enable high performance mode (slower updates, less CPU, optimized security)
-u, --unit <unit> Traffic unit format [default: k]
-U, --data-unit <unit> Data unit for totals [default: M]
-m, --multiple Show multiple devices
-f, --file <path> Log traffic data to file
--sre-terminal SRE forensics dashboard mode
--show-overview Simple overview mode
--debug-dashboard Debug mode with detailed metrics
--test Test mode - single output and exit
--force-terminal Force terminal mode (no TUI)
h - Human-readable bits (auto-scaling)H - Human-readable bytes (auto-scaling)k/K - Kilobits/Kilobytesm/M - Megabits/Megabytesg/G - Gigabits/Gigabytesb/B - Raw bits/bytesConfiguration is stored in TOML format:
~/.netwatch/config.toml - Primary configuration~/.nload - nload compatibility mode# ~/.netwatch configuration file
AverageWindow = 300
BarMaxIn = 0
BarMaxOut = 0
DataFormat = "M"
Devices = "all"
MultipleDevices = false
RefreshInterval = 500
TrafficFormat = "k"
# Active Diagnostics Configuration
# These targets will be tested for connectivity and performance
DiagnosticTargets = [
"1.1.1.1", # Cloudflare DNS (fast, privacy-focused)
"8.8.8.8", # Google DNS (widely accessible)
"9.9.9.9" # Quad9 DNS (security-focused)
]
# DNS domains to test for resolution performance
DNSDomains = [
"cloudflare.com", # Reliable test domain
"google.com", # Reliable test domain
"github.com" # Development-relevant domain
]
Note: See example.netwatch in the repository for a complete configuration template.
# Clone repository
git clone https://github.com/vietcgi/netwatch
cd netwatch
# Build release version
cargo build --release
# Run tests
cargo test
# Install locally
cargo install --path .
# Run with debug logging
RUST_LOG=debug cargo run
# Run specific interface
cargo run -- en0
# Run tests with output
cargo test -- --nocapture
# Format code
cargo fmt
# Lint code
cargo clippy
# Test mode - single output and exit
netwatch --test
# Debug dashboard without TUI
netwatch --debug-dashboard
# List interfaces (good for CI)
netwatch --list
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
# Clone the repository
git clone https://github.com/vietcgi/netwatch
cd netwatch
# Initial setup (installs git hooks, builds project)
make setup
# Development workflow
make dev # Run fmt, clippy, and tests
make check # Run all quality checks
make help # Show all available commands
This project uses automated git hooks for code quality:
cargo fmt, cargo clippy, and cargo testmake setup or ./scripts/setup-hooks.shmake build # Build the project
make test # Run tests
make fmt # Format code
make clippy # Run linting
make clean # Clean build artifacts
make install # Install locally
make watch # Watch for changes
netwatch-rs (on crates.io)netwatch (command users run)vietcgi/netwatch (GitHub)This project is licensed under the MIT License - see the LICENSE file for details.
netwatch - Modern network monitoring for the terminal era