Home Command line utilities Display Ping Command Output In Graph Format Using Gping
Display Ping Command Output In Graph Format Using Gping

Display Ping Command Output In Graph Format Using Gping

By sk
1896 Views

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>

Example:

$ ping -c 3 ostechnix.com

Here, -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
ping command output
ping command output

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

Gping is available in AUR, so you can install Gping on Arch Linux and its variants using an AUR helper program, for example Yay.

$ 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
Display Ping Command Output In Graph Format Using Gping In Linux
Display Ping Command Output In Graph Format Using Gping In Linux

To exit Gping, press q or hit ESC key.

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

Resource:

Related read:

You May Also Like

1 comment

Jalal November 17, 2020 - 1:39 pm

Hi,
Very nice command and useful
Thanks a lot

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More