How To Ping IP or Host with Graph using gping

Have you wondered how you could ping an IP address or Host name and visualize data with a graph?. gping is a command line tool which enables you to ping an IP address or hostname in your network and visualize the output in a graph. This cross platform tool is available on Github for download and use.

How To Install gping on Linux, macOS and Windows

Binary packages for gping are available and can be downloaded manually from releases page or by using command line tools such as wget and curl.

Download and install latest gping release on Linux:

VER=$(curl -s https://api.github.com/repos/orf/gping/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/gping-v//')
wget https://github.com/orf/gping/releases/download/gping-v${VER}/gping-Linux-gnu-x86_64.tar.gz
tar xvf gping-Linux-gnu-x86_64.tar.gz
sudo chmod +x gping
sudo mv gping /usr/local/bin

Download and install latest gping release on macOS:

VER=$(curl -s https://api.github.com/repos/github_username/repository_name/releases/latest|grep tag_name|cut -d '"' -f 4|sed 's/v//')
wget https://github.com/orf/gping/releases/download/gping-v${VER}/gping-macOS-x86_64.tar.gz
tar xvf gping-macOS-x86_64.tar.gz
chmod +x gping
sudo mv gping /usr/local/bin

Confirm installation was successful by checking software version:

$ gping --version
gping 1.19.0
commit_hash: e66b021
build_time: 2024-12-18 13:16:22 +00:00
build_env: rustc 1.83.0 (90b35a623 2024-11-26),stable-x86_64-unknown-linux-gnu

Using gping on Linux, macOS and Windows

Once gping is installed you can view usage help page:

$ gping --help
Ping, but with a graph.

Usage: gping [OPTIONS] [HOSTS_OR_COMMANDS]...

Arguments:
  [HOSTS_OR_COMMANDS]...  Hosts or IPs to ping, or commands to run if --cmd is provided. Can use cloud shorthands like aws:eu-west-1

Options:
      --cmd
          Graph the execution time for a list of commands rather than pinging hosts
  -n, --watch-interval <WATCH_INTERVAL>
          Watch interval seconds (provide partial seconds like '0.5'). Default for ping is 0.2, default for cmd is 0.5
  -b, --buffer <BUFFER>
          Determines the number of seconds to display in the graph [default: 30]
  -4
          Resolve ping targets to IPv4 address
  -6
          Resolve ping targets to IPv6 address
  -i, --interface <INTERFACE>
          Interface to use when pinging
  -s, --simple-graphics

      --vertical-margin <VERTICAL_MARGIN>
          Vertical margin around the graph (top and bottom) [default: 1]
      --horizontal-margin <HORIZONTAL_MARGIN>
          Horizontal margin around the graph (left and right) [default: 0]
  -c, --color <color>
          Assign color to a graph entry.

          This option can be defined more than once as a comma separated string, and the
          order which the colors are provided will be matched against the hosts or
          commands passed to gping.

          Hexadecimal RGB color codes are accepted in the form of '#RRGGBB' or the
          following color names: 'black', 'red', 'green', 'yellow', 'blue', 'magenta',
          'cyan', 'gray', 'dark-gray', 'light-red', 'light-green', 'light-yellow',
          'light-blue', 'light-magenta', 'light-cyan', and 'white'
      --clear
          Clear the graph from the terminal after closing the program
      --ping-args [<PING_ARGS>...]
          Extra arguments to pass to `ping`. These are platform dependent
  -h, --help
          Print help
  -V, --version
          Print version

See example below with ping request to google.com.

$ gping google.com

Here is the screenshot.

I hope you enjoy ping with graph tool in your Linux and macOS system.

More guides:

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Unlock the Right Solutions with Confidence

At CloudSpinx, we don’t just offer services - we deliver clarity, direction, and results. Whether you're navigating cloud adoption, scaling infrastructure, or solving DevOps challenges, our seasoned experts help you make smart, strategic decisions with total confidence. Let us turn complexity into opportunity and bring your vision to life.

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

In this guide, we are going to look at how to download media content from the web with You-Get. You-Get […]

WordPress is an open source content management system (CMS) written entirely in PHP. It uses MySQL or MariaDB database server […]

Every event that occurs in your Linux system is captured and stored as logs and it allows one to go […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.