β‘ NetPulse
Ultra-lightweight, zero-flicker, non-blocking terminal network dashboard in Rust.
π Why NetPulse?
Most terminal network tools force you into an unappealing trade-off: heavy background resource consumption, screen flicker during refresh, mandatory sudo/root privileges for basic ICMP pings, or complex configuration just to see why your connection feels sluggish.
NetPulse is built from the ground up for systems engineers, SREs, and terminal power users:
- Zero Sudo Required: Transparent ICMP ping with automated non-blocking TCP fallback (ports 443 & 53) ensures reliable latency diagnostics in locked-down or containerized environments.
- True Non-Blocking Async: Powered by Tokio and Hickory DNS; network I/O, DNS benchmarks, port polling, and UI rendering execute independently with zero frame drops.
- Zero-Flicker Ratatui TUI: 15 FPS sub-millisecond redraws with zero heap allocations on the render path.
- Minimal Footprint: Single static binary (< 4MB stripped), instant startup, and near-zero CPU/memory footprint.
πΊ Preview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NETPULSE β 3 ifaces | gw: 192.168.1.1 | dns: 1.1.1.1 | status: active β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Network Interfaces ββββββββββββββββββββββββββββββββββββββββ Throughput History ββββββββββββββββββββββββββββ
βInterface RX Rate TX Rate Total RX Total TX ββ RX: en0 (14.2 MB/s) β
βen0 14.2 MB/s 1.8 MB/s 8.42 GB 2.15 GB ββ ββ
ββ β ββββ
β
βutun3 820 KB/s 110 KB/s 412.0 MB 98.4 MB ββββ
ββββββββββββββ β
βlo0 0 B/s 0 B/s 185.9 MB 185.9 MB ββ TX: en0 (1.8 MB/s) β
β ββ β β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Ping & Latency Probes ββββββββββββββββββββββββββββββββ DNS Latency Benchmark (avg: 12.4ms) ββββββββββββββββ
ββ 1.1.1.1 11ms [icmp] β 8.8.8.8 14ms [icmp] βββ google.com 8.2ms (142.250.190.46) β
ββ gw:192.168.1.1 1ms [icmp] βββ cloudflare.com 11.4ms (104.16.132.229) β
βmin: 1.0ms avg: 8.7ms max: 14.0ms loss: 0% βββ github.com 17.6ms (140.82.121.4) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Open / Listening Ports (4) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βProto Port PID Process Name β
βTCP 22 1420 sshd β
βTCP 5432 2811 postgres β
βTCP 8080 4190 node (backend-api) β
βUDP 5353 312 mDNSResponder β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
q / esc quit ctrl+c exit β pulse active
β¨ Key Features
| Feature | Description |
|---|---|
| π Real-Time Bandwidth & Sparklines | Per-interface RX/TX rates computed accurately over exact time deltas, accompanied by adaptive 30-sample history sparklines. |
| π Zero-Privilege Latency Probing | High-precision ICMP pings with seamless fallback to concurrent non-blocking TCP handshakes (raced across 443 & 53). |
| β‘ Parallel DNS Resolution | Concurrently benchmarks your upstream resolvers against top global domains using futures::future::join_all. |
| π Open Port & Socket Auditor | Scans listening TCP/UDP sockets and maps them to active process names without spiking CPU or memory. |
| π¨ Adaptive & Responsive UI | Responsive Ratatui layout that scales cleanly from small terminal splits (40x10) to ultra-wide displays with NO_COLOR support. |
| π‘οΈ Endian-Safe Route Detection | Cross-platform gateway discovery supporting macOS routing tables and Linux /proc/net/route on both Little-Endian and Big-Endian architectures. |
π¦ Installation
Option 1: Via Cargo (from Crates.io)
Installs the netpulse executable binary onto your PATH:
Option 2: Via cargo-binstall (Fast Pre-built Binary)
Option 3: Download Pre-built Binaries
Download the pre-compiled binary for your platform from the GitHub Releases:
# macOS (Apple Silicon / ARM64)
# Linux (x86_64)
Option 4: Build from Source
π Shell Completions
Generate native auto-completion scripts for your shell using --generate-completions:
# Zsh
# Add 'fpath+=~/.zfunc' to your ~/.zshrc if not already present
# Bash
# Fish
π» Usage & CLI Flags
# Launch with default settings (1s refresh, auto-detect active interfaces)
# High-frequency refresh (250ms interval)
# Monitor a specific interface only (e.g. en0 or eth0)
# Show all interfaces including inactive / virtual loopbacks
# Plain monochrome output (or export NO_COLOR=1)
CLI Reference
| Flag | Short | Default | Description |
|---|---|---|---|
--interval <MS> |
-i |
1000 |
Collector refresh interval in milliseconds |
--interface <NAME> |
Auto |
Network interface to monitor | |
--all |
-a |
false |
Show all interfaces, including inactive ones |
--no-color |
false |
Disable ANSI colored output | |
--generate-completions <SHELL> |
Output shell completion script (bash, zsh, fish, powershell, elvish) |
||
--help |
-h |
Print help and options | |
--version |
-V |
Print version |
β¨οΈ Keyboard Shortcuts
| Key | Action |
|---|---|
| q | Quit application and restore terminal |
| Esc | Quit application and restore terminal |
| Ctrl + C | Force exit safely |
ποΈ Architecture & Zero-Privilege Security
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β main.rs β
β (15 FPS Ratatui Loop Β· Zero Heap Allocation / Render) β
ββββββββ²ββββββββββββββββββ²ββββββββββββββββββ²ββββββββββββββ
β β β
ββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββ΄ββββββββββββββ
β Bandwidth Task ββ Latency Task ββ DNS Task β
β (sysinfo-rs) ββ (ICMP + TCP) ββ(Hickory Resolver) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Lock-Free Communication: Each background collector asynchronously publishes immutable snapshots over
tokio::sync::watchchannels without sharedMutexlocks or global statics. - True Async Network I/O: Network probes utilize non-blocking async sockets bounded by deterministic timeouts, preventing unresponsive threads even on broken routing paths.
- Safe Sub-millisecond Rendering: Snapshot states are borrowed directly by reference during UI passes (
watch::Receiver::borrow()), completely avoiding clone churn and garbage collection pauses. - Zero-Privilege Guarantee: Uses OS routing sysctls and non-privileged raw ICMP/TCP handshake capabilities provided by modern Linux kernels (
net.ipv4.ping_group_range) and macOS sockets.
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
# Run test suite
# Run linter
π License
This project is dual-licensed under either:
at your option.