Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
netoproc
Per-process network traffic monitor for macOS
Overview
netoproc is a terminal-based network monitoring tool for macOS that shows per-process, per-socket, per-connection network traffic in real time. It captures packet headers via BPF (Berkeley Packet Filter) and correlates them with process and socket information from macOS system APIs.
Unlike nettop (Apple's built-in), netoproc provides per-connection traffic rates, a dedicated DNS observatory, a pipe-friendly snapshot mode for scripting, and htop-style keyboard navigation.
Prerequisites
- macOS 26.0 (Tahoe) or higher
- Rust stable toolchain (edition 2024)
- Root privileges (
sudo) for BPF device access
Install Rust via rustup:
|
Installation
Build from source
From crates.io (once published)
Usage
netoproc requires root privileges. Always run with sudo:
# Interactive TUI (default)
# Snapshot mode (TSV output)
# Snapshot in JSON
# Monitor a specific interface
# Filter by process name
# Fast refresh (500ms)
See docs/USAGE.md for the complete user guide with all options, views, keyboard shortcuts, output formats, and examples.
Features
- Four TUI views: Process, Connection, Interface, DNS
- Per-connection metrics: RX/TX rates, RTT, jitter, retransmissions
- DNS observatory: Live query log, resolver latency stats
- Snapshot mode: TSV and JSON output for scripting and piping
- Sparkline charts: Visual traffic trends in the terminal
- Keyboard navigation: htop-style filtering, sorting, row expansion
Architecture
Three-thread model:
- BPF capture thread: Reads raw packets from
/dev/bpfNvia Berkeley Packet Filter - Stats poller thread: Correlates packets with processes/sockets, publishes state via
ArcSwap - TUI/snapshot thread: Renders the interactive display or serializes output
See docs/DESIGN.md for the full architecture documentation.
Development Setup
# Check compilation
# Build (debug mode)
# Run unit tests (no sudo needed)
# Run all tests including integration (requires sudo)
Running Tests
# Unit tests only
# All tests (requires sudo)
# Specific test
# Lint check
# Full lint pass (check + clippy + fmt)
Linting & Formatting
# Format code
# Format check (CI)
# Lint with Clippy
# Combined lint (check + clippy + fmt-check)
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
Security
See SECURITY.md for reporting vulnerabilities.
License
MIT © 2026 Xuan Lee. See LICENSE for details.