Nping: A High-Performance Concurrent Ping Tool in Rust with Live Charts

5月14日 Published inNetwork Tools

Nping is a high-performance network utility written in Rust, designed to probe multiple targets simultaneously. Unlike standard ping tools, it plots results in real time, providing live charts and a comprehensive statistical overview of your network’s behavior.

Key Features

  1. Concurrent Pings: Send ICMP requests to several IPs or hostnames at once. There is no sequential bottleneck; all targets are monitored in parallel.
  2. Visual Latency Tracking: Integrated terminal charts allow you to visualize latency spikes and dips as they occur.
  3. Real-Time Metrics: Statistics for minimum, maximum, and average latency, along with packet loss percentages, update continuously.
  4. IPv4 and IPv6 Support: Nping works natively with both protocols. It automatically selects the appropriate version unless a specific one is forced.
  5. Multi-IP Resolution: If a hostname resolves to multiple IP addresses, Nping can ping all of them simultaneously.
  6. Data Export: Save your monitoring results to a file for later analysis or documentation.

Installation on macOS (Homebrew)

You can get Nping up and running with two quick commands:

brew tap hanshuaikang/nping
brew install nping

Verify the installation by checking the help menu:

nping --help

Usage

To start monitoring, type nping followed by your target hostnames or IP addresses.

nping www.baidu.com www.google.com www.apple.com www.sina.com -c 20 -i 2

In this example, -c 20 limits the session to 20 pings per target, and -i 2 sets a two-second interval between each request.

Command Options

Flag Description
-c, --count <COUNT> Total number of pings to send. Defaults to 65535.
-i, --interval <INTERVAL> Time in seconds between pings. Default is 0.
-6, --force_ipv6 Restrict pings to IPv6 only.
-m, --multiple <MULTIPLE> Maximum concurrent IPs to ping per hostname.
-v, --view-type <VIEW_TYPE> Choose display mode: graph, table, or point.
-o, --output <OUTPUT> Export the final results to a specified file.
-h, --help Display the help menu.
-V, --version Display the current version of Nping.

View Modes

Graph View The default mode. It renders a live, scrolling chart for each host, displaying the latest RTT (Round Trip Time), Average latency, Jitter, Max/Min values, and packet loss for every target.

Table View A high-density layout that removes the charts in favor of structured columns. The table automatically sorts targets by packet loss and latency, making it ideal for comparing dozens of endpoints at a glance.

Point View A compact status dashboard where each ping is represented by a symbol. A green dot indicates a healthy response. An up arrow signifies high latency (exceeding 80% of the recorded maximum), and an × represents a timeout. This mode is the fastest way to spot intermittent connectivity issues across many hosts.