How to Install and Use gping in Linux to Graph Network Ping Latency in Real Time

Standard terminal ping has been a staple of network troubleshooting for decades. However, monitoring continuous output across hundreds of sequential lines makes spotting latency spikes, micro-drops, and routing jitter cumbersome. Reading scrolling raw numbers requires mental math to assess connection stability over time.

gping (Graphical Ping) is an open-source terminal utility written in Rust that transforms ping metrics into a dynamic, real-time graphical sparkline chart directly inside your command line. It supports multi-host benchmarking, custom graphing buffers, and integrated HTTP request execution. This guide demonstrates how to install, configure, and use gping across Linux distributions.

Key Advantages of gping

  • Real-Time Visual Graphs: Plots latency in milliseconds along an interactive line chart with dynamic scaling.
  • Multi-Host Comparison: Graphs multiple network hosts simultaneously on the same axis with distinct colours.
  • HTTP Latency Benchmarking: Supports web endpoints (e.g. https://example.com) to measure full TLS handshake and HTTP response times.
  • Lightweight Resource Usage: Compiled as a single static binary with minimal CPU overhead.

Installing gping on Linux

Method 1: Using Distribution Package Managers

# Ubuntu / Debian (Ubuntu 22.04+)
sudo apt update && sudo apt install -y gping

# Arch Linux / Manjaro
sudo pacman -S gping

# Fedora / CentOS Stream
sudo dnf install -y gping

Method 2: Using Cargo (Rust Universal)

If running a distribution without native packages:

cargo install gping

Practical Usage Scenarios

1. Basic Single Host Graphing

Monitor connection stability to a public DNS server or gateway:

gping 1.1.1.1

The terminal immediately clears and renders an auto-updating ASCII graph displaying current latency, minimum, maximum, and average response times.

2. Comparing Multiple Hosts Concurrently

To evaluate routing quality across competing cloud providers or local gateways, pass multiple addresses:

gping 1.1.1.1 8.8.8.8 9.9.9.9

gping graphs each target with a unique coloured line and renders a legend indicating per-host response speeds in real time.

3. Monitoring Web Server HTTP Latency

Use the --cmd flag to benchmark application-layer response times rather than low-level ICMP ping:

gping --cmd "curl -s -o /dev/null -w '%{time_total}' https://example.com"

Command Options and Customisation

Flag Argument Function
-b --buffer <seconds> Determines the time duration displayed on the horizontal axis (default: 30s)
-n --watch-interval <seconds> Interval between consecutive ping probes (e.g. 0.2 for 200ms)
-4 N/A Forces IPv4 resolution exclusively
-6 N/A Forces IPv6 resolution exclusively

Network Stability Diagnostic Tips

  • Identifying Wi-Fi Bufferbloat: If latency graph spikes vertically under file downloads, your local router is experiencing bufferbloat.
  • Correlating Packet Loss: When a ping fails, gping draws a red break in the graph, making dropped packets immediately visible compared to scrolling terminal text.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.