7
头图

When it comes to detecting network connectivity tools, the ping command must be the first choice.

However, today, migrant workers recommend a powerful command line tool: gping.

图片

gping is a visualization tool written based on Rust with a dynamic graphical interface display.

图片

Install

Download the installation package corresponding to the system

图片

This article takes CentOS7 system as an example. For other systems, please refer to official documents.

[root@centos7 ~]# wget https://github.com/orf/gping/releases/download/gping-v1.2.6/gping-Linux-x86_64.tar.gz
[root@centos7 ~]# ll gping-Linux-x86_64.tar.gz 
-rw-r--r-- 1 root root 889865 Dec  7 22:20 gping-Linux-x86_64.tar.gz
[root@centos7 ~]# mkdir /usr/local/gping
[root@centos7 ~]# tar zxf gping-Linux-x86_64.tar.gz -C /usr/local/gping

If after installation, the following error occurs when running the command:

./gping: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./gping)

The solution is as follows:

curl -O http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxf glibc-2.18.tar.gz 
cd glibc-2.18/
mkdir build
cd build/
../configure --prefix=/usr
make -j2
make install

use

[root@centos7 gping]# ./gping --help
gping 1.2.6
Ping, but with a graph.

USAGE:
    gping [FLAGS] [OPTIONS] <hosts-or-commands>...

FLAGS:
        --cmd                Graph the execution time for a list of commands rather than pinging hosts
    -h, --help               Prints help information
    -4                       Resolve ping targets to IPv4 address
    -6                       Resolve ping targets to IPv6 address
    -s, --simple-graphics    Uses dot characters instead of braille
    -V, --version            Prints version information

OPTIONS:
    -b, --buffer <buffer>                    Determines the number of seconds to display in the graph. [default: 30]
    -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.

ARGS:
    <hosts-or-commands>...    Hosts or IPs to ping, or commands to run if --cmd is provided.

图片

It can also operate on multiple target addresses at the same time.

图片

图片

图片


民工哥
26.4k 声望56.7k 粉丝

10多年IT职场老司机的经验分享,坚持自学一路从技术小白成长为互联网企业信息技术部门的负责人。2019/2020/2021年度 思否Top Writer