gping — real-time ping graph
💬 "gping command"
gping is a real-time ping graph that visualizes ping response times as a live graph. See latency trends at a glance inside your terminal.
Renders real-time graphs in your terminal using ANSI. Monitors multiple hosts simultaneously.
- Concept: Renders real-time graphs in your terminal using ANSI.
- Key Features: Monitors multiple hosts simultaneously.
- Advantage: Displays markers on the graph when a ping fails.
- Usage: Supports TCP ping (measuring latency per port).
Installation and Download
gping can be installed via a package manager or the official script.
| Environment | Command |
|---|---|
| Rust cargo | cargo install gping |
| macOS (brew) | brew install gping |
| Official Binary | github.com/orf/gping/releases |
| Windows | winget install gping |
| Verify | gping --version |
To verify the installation, use gping --version.
Commonly Used Options
| Option | Description |
|---|---|
| gping <host> | Ping graph for a single host |
| gping -4 <host> | Use only IPv4 |
| gping -6 <host> | Use only IPv6 |
| gping --tcp <host> <port> | TCP mode port ping |
| gping h1 h2 h3 | Monitor multiple hosts simultaneously |
3 Essential Command Combinations
gping google.com— Basic ping graphgping 8.8.8.8 1.1.1.1— Compare both DNS serversgping --tcp myserver.com 443— Check HTTPS port response latency
💬 "Show me an example of using gping on an actual server"
Here is a step-by-step breakdown of a common situation encountered on production servers.
Step 1 · Verify Installation
Check if it is installed.
gping --version || cargo install gping
Step 2 · Compare DNS
Spin up both DNS servers.
gping 8.8.8.8 1.1.1.1
Step 3 · Port Ping
Add a port ping to the target server.
gping --tcp myserver.com 443
Actual Execution Screen
This is the ping graph comparing both DNS servers.
!gping command execution result
Actual production server
How It's Used in Practice
1. Identifying Network Bottlenecks
Situation — Compare the gateway, DNS, and target simultaneously.
gping 8.8.8.8 1.1.1.1
Result — If only the gateway is slow, it's a VPN issue; if only the target is slow, it's a remote server issue.
Key Point — Narrow down the cause by comparing multiple targets.
2. Catching Intermittent Disconnections
Situation — Record network disconnections at night.
gping --tcp myserver.com 443
Result — Disconnection times and graph markers are recorded.
Key Point — Run it inside tmux for continuous monitoring.
Actual Execution Screen
This graph shows port latency checked via TCP ping.
!gping command execution result 2
Actual production server
Points of Caution
- gping uses ICMP or TCP ping. If ICMP is blocked by a firewall, the graph will be empty.
- If the terminal width is narrow, the graph resolution will decrease. A minimum of 60 columns is recommended.
- TCP ping only checks port response, unlike ICMP ping. A successful ping does not mean all ports are open.
Source (HTML): https://games.aidebatehub.com/programs/linux/network/gping.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments