netwatch
A modern network traffic monitor for Unix systems, inspired by nload but written in Rust with enhanced features and beautiful terminal interfaces.
โจ Features
Core Monitoring
- Real-time network monitoring - Live bandwidth and packet statistics
- Multi-interface support - Monitor multiple network interfaces simultaneously
- Cross-platform - Native support for Linux and macOS
- nload compatibility - Drop-in replacement with all nload command-line options
Advanced Analytics
- SRE Dashboard - Advanced network forensics and diagnostics
- Active Diagnostics - Real-time connectivity testing and health monitoring
- Connection Tracking - Monitor TCP/UDP connections with process information
- Performance Analysis - Bottleneck detection and network quality metrics
- System Integration - CPU, memory, and disk usage correlation
Modern Interface
- Beautiful Terminal UI - Rich, colorful terminal interface with graphs
- Multiple Display Modes - Dashboard, simple overview, or classic nload-style
- Interactive Controls - Keyboard shortcuts for navigation and configuration
- Export Capabilities - Log to files in various formats
Quick Start
Installation
Automated Installation (Recommended)
# Install latest version
|
# Or with wget
|
# Install to custom directory
INSTALL_DIR=/.local/bin |
Package Managers
# Rust/Cargo
# Homebrew (macOS)
# Docker
Manual Download
Download pre-built binaries from the Releases page for:
- Linux x86_64 (glibc & musl)
- Linux ARM64 (glibc & musl)
- macOS x86_64 & ARM64
From Source
Basic Usage
# Auto-detect and monitor default interface
# List available interfaces
# Monitor specific interface
# SRE forensics dashboard mode
# Simple overview mode
# Monitor multiple interfaces
๐ Display Modes
1. SRE Dashboard (Default)
Advanced network forensics interface with:
- Real-time connection analysis
- Active diagnostics and health checks
- Performance bottleneck detection
- System resource correlation
- Security monitoring alerts
2. Simple Overview
Clean, minimal interface showing:
- Interface statistics
- Bandwidth utilization
- Packet counts and rates
- Error summaries
3. Multi-Interface Mode
Monitor multiple interfaces with:
- Side-by-side comparisons
- Aggregate statistics
- Per-interface details
โ๏ธ Command Line Options
Core Options (nload compatible)
)
)
)
Display Modes
)
Unit Formats
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/bytes
๐ฎ Interactive Controls
Navigation
- Arrow keys - Navigate between interfaces/sections
- Tab - Switch between dashboard panels
- Enter - Select/drill down into details
Display Controls
- Space - Pause/resume monitoring
- r - Reset statistics
- g - Toggle graph display
- +/- - Zoom graph scale
- u - Cycle through unit formats
System Controls
- F2 - Show options/settings
- F5 - Save current configuration
- F6 - Reload configuration
- q or Ctrl+C - Quit
๐ Configuration
Configuration Files
Configuration is stored in TOML format:
~/.netwatch/config.toml- Primary configuration~/.nload- nload compatibility mode
Example Configuration
# ~/.netwatch configuration file
= 300
= 0
= 0
= "M"
= "all"
= false
= 500
= "k"
# Active Diagnostics Configuration
# These targets will be tested for connectivity and performance
= [
"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
= [
"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.
๐ง Building from Source
Requirements
- Rust 1.70+ - Latest stable Rust toolchain
- Unix-like system - Linux, macOS, or BSD
- Development tools - git, cargo
Build Process
# Clone repository
# Build release version
# Run tests
# Install locally
Development
# Run with debug logging
RUST_LOG=debug
# Run specific interface
# Run tests with output
# Format code
# Lint code
๐งช Testing
Test Interface
# Test mode - single output and exit
# Debug dashboard without TUI
# List interfaces (good for CI)
๐ Performance
- Memory efficient - Rust's zero-cost abstractions
- Low CPU overhead - Optimized for continuous monitoring
- Scalable - Handles hundreds of network interfaces
- Battery friendly - Configurable refresh intervals
๐ Security
- Memory safe - Rust prevents buffer overflows and memory leaks
- Privilege separation - Runs with minimal required permissions
- No network transmission - Only reads local system statistics
- Input validation - All inputs are validated and sanitized
๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
# Clone the repository
# Initial setup (installs git hooks, builds project)
# Development workflow
Git Hooks
This project uses automated git hooks for code quality:
- Pre-commit: Runs
cargo fmt,cargo clippy, andcargo test - Auto-installation: Run
make setupor./scripts/setup-hooks.sh
Development Commands
Package Information
- Crate name:
netwatch-rs(on crates.io) - Binary name:
netwatch(command users run) - Repository:
vietcgi/netwatch(GitHub)
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Inspired by nload by Roland Riegel
- Built with ratatui for terminal UI
- Uses clap for command-line parsing
๐ Support
- Issues: GitHub Issues
- Security: See SECURITY.md for reporting security issues
- Discussions: GitHub Discussions
netwatch - Modern network monitoring for the terminal era