This guide talks about the brief history of ping network administration utility and how to display ping command output in graph format using gping utility in Linux.
A brief introduction to Ping
Ping is a well known command line utility to test connectivity and reachability between devices in LAN and WAN. Ping stands for Packet InterNet Groper. It sends Internet Control Message Protocol (ICMP) echo request packets to a specified URL or IP address and expects an ICMP echo reply from the target host. If you receive a reply from the target host, it means the host is alive. Ping is a most commonly used network diagnostics tool to troubleshoot network-related issues.
Ping is one of the oldest utility ever created in computer networking field. It is developed by Michael John Muuss, an American scientist, in 1983. Ping supports almost all operating systems, including GNU/Linux, Unix, macOS and Windows and embedded systems.
The typical way to use
ping command to check if a host is alive in the network is given below:
$ ping <ip-or-url>
$ ping -c 3 ostechnix.com
-c 3 indicates the number of ECHO_REQUEST packets to send.
The above command will return an output something like below:
PING ostechnix.com(2606:4700:20::681a:528 (2606:4700:20::681a:528)) 56 data bytes 64 bytes from 2606:4700:20::681a:528 (2606:4700:20::681a:528): icmp_seq=1 ttl=55 time=105 ms 64 bytes from 2606:4700:20::681a:528 (2606:4700:20::681a:528): icmp_seq=2 ttl=55 time=103 ms 64 bytes from 2606:4700:20::681a:528 (2606:4700:20::681a:528): icmp_seq=3 ttl=55 time=103 ms --- ostechnix.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 102.852/103.667/105.223/1.100 ms
Some of you may not like the default output format of the regular ping command. You may want to visualize the ping command's output in some graphical format. This is where gping utility comes in handy!
Say hello to Gping
Gping is a cross-platform, command line program that displays a pretty graph inside your terminal when you try to ping a host or website. The author describes it - "ping, but with a graph."
Gping displays the ping command's output with graphs, instead of numbers and text. It is an open source network utility written in Rust programming language and released under MIT license. Gping currently supports GNU/Linux, macOS and Windows.
Install Gping on Linux
$ yay -S gping-git
On other Linux distributions, you can install it using
cargo package manager. Cargo package manager is distributed by default with Rust. So make sure you have installed the current stable release of Rust in your Linux system as described in the following link:
After installing Rust, run the following command to install Gping:
$ cargo install gping
Display Ping Command Output In Graph Format Using Gping In Linux
To check the network connectivity of a host or website (E.g. ostechnix.com) with Gping and display the output in a graph format, simply run this command from the Terminal:
$ gping ostechnix.com
To exit Gping, press
q or hit
Compared to the regular ping utility, Gping is very minimal and doesn't provide any options to customize the output the way you want. For example, you can't,
- specify the number of ECHO_REQUEST packets to send,
- specify the interval in seconds between requests,
- ring a bell when a packet is received,
- display a message if no response was received.
Gping is only meant for displaying the ping command output in graph format. Nothing more, nothing less. It does this job perfectly as it is advertised.
To display Gping's help section, run:
$ gping --help gping 0.1.6 Ping, but with a graph. USAGE: gping <host> FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: <host> Host or IP to ping