Skip to main content

pingx

A full-screen terminal ping monitor with live RTT history, rolling loss stats, and WAN failover detection.

Standard ping gives you a wall of scrolling numbers. pingx replaces that with a live four-panel dashboard: a braille sparkline that plots RTT over time, rolling packet loss windows, and automatic detection of gateway changes — useful when your network runs dual-WAN or has a failover setup.

pingx demo

Features

  • Auto-reconnect — detects network down after 5 consecutive timeouts, retries in the background, resumes automatically on recovery
  • WAN failover detection — polls the default route every 3 seconds; announces gateway changes as they happen
  • Braille sparkline — rolling RTT history rendered with Unicode braille characters; auto-scales Y-axis to the observed range so variation is always visible
  • Live RTT stats — current / average / min / max, updated every ping
  • Rolling loss windows — packet loss over the last 5 minutes and last 1 hour, plus all-time total
  • Failover event log — last 2 WAN events with timestamps and recovery durations
  • Colour themes — 6 named palettes that restyle the entire interface
  • No root required — uses unprivileged ICMP (SOCK_DGRAM) on macOS; see Linux notes below

Install

Homebrew (macOS — recommended):

brew install tom-xyz/tap/pingx

pipx (any platform — recommended for CLI tools):

pipx install pingx

pip:

pip install pingx

From source:

git clone https://github.com/Tom-xyz/pingx.git
cd pingx
pip install -e .

Requirements

Usage

pingx [OPTIONS] host
pingx 9.9.9.9
pingx google.com
pingx 192.168.1.1          # ping your router
pingx -c 100 8.8.8.8       # stop after 100 pings
pingx -i 1 -W 2 8.8.8.8   # 1-second interval, 2-second timeout
pingx --color blue 9.9.9.9 # blue theme

Press Ctrl-C to exit. A summary (packets transmitted/received, loss %, min/avg/max/stddev RTT) is printed on exit.

Options

Flag Long Default Description
-c N --count unlimited Stop after N pings
-i S --interval 0.2 Ping interval in seconds
-s B --size 56 ICMP payload size in bytes
-t N --ttl 64 IP Time To Live
-W S --timeout 1.5 Receive timeout per ping
--color THEME green Colour theme (see below)
--version Print version and exit

Colour themes

--color green (default) --color blue --color cyan --color amber --color red --color purple

Each theme changes the entire interface palette — borders, logo gradient, sparkline health bands, stats colouring, and status indicators.

Layout

┌────────────────────────────────┬───────────────────────────┐
│  PINGX logo + connection info  │  Live RTT & packet stats  │  (top, 2:5 ratio)
├────────────────────────────────┼───────────────────────────┤
│  Latency History               │  WAN & Events             │  (bottom, 3:2 ratio)
│  (braille sparkline, Y=RTT)    │  (route + failover log)   │
└────────────────────────────────┴───────────────────────────┘

The layout reflows on terminal resize. The latency history panel intentionally dominates — it's the primary visual.

Sparkline

The latency history chart uses Unicode braille characters as a 2×4-pixel canvas per character, giving high-density RTT visualization without any dependencies beyond rich.

  • Y-axis auto-scales to the observed RTT range — stable networks show their micro-variation instead of a flat line
  • Right edge = newest ping (bold); scrolls left as data arrives
  • Dim red ⣀ dots fill the chart before data arrives
  • True timeouts render as natural gaps (empty braille space)
  • Colour bands are intentionally wide (< 80ms = ok, not < 20ms) so normal home-network variation never flips colour

Platform support

macOS works out of the box. pingx uses socket.SOCK_DGRAM with IPPROTO_ICMP, which macOS grants without elevated privileges.

Linux requires unprivileged ICMP to be enabled. If you see a permission error, run once as root:

sudo sysctl -w net.ipv4.ping_group_range="0 65535"

To make it permanent, add to /etc/sysctl.conf:

net.ipv4.ping_group_range = 0 65535

Or simply run sudo pingx ....

Windows is not supported. Use WSL2.

Running tests

pip install pytest
python3 -m pytest tests/

License

MIT — see LICENSE

Metadata

Release files for pingx 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pingx 1.2.0
File Size Uploaded
pingx-1.2.0.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pingx 1.2.0
File Interpreter ABI Platform
pingx-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.8 kB

Release files / pingx-1.2.0.tar.gz

Download URL pingx-1.2.0.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
66783f2371c78f6e6bad349c2d97cfca5b547f6cfc3897b1653c2f8fd135312e
BLAKE2b-256 checksum
How to use checksums
8088441dcc312d5b25beadfb612dde2a98b7e9b469467da81c6b7b5163b30218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Release files / pingx-1.2.0-py3-none-any.whl

Download URL pingx-1.2.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60ce42a8be660e1a79cabf8dc74c214813ef75d74ce25029edc3562ed36aef18
BLAKE2b-256 checksum
How to use checksums
a26ffc7bd715e1ce9506bec8b02c3c58ef7a90d9f0138e2dc857ec2218c63356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.1

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page