网络
gping 是基于 Rust 编写可视化工具,具有动态图形化界面显示。
ping命令可视化工具—gping - 图1
Github仓库地址:https://github.com/orf/gping/releases

安装

gping-Windows-x86_64.zip
下载系统所对应的安装包
image.png
本文以CentOS7系统为例,其它系统请参考官方文档。

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

如果安装完后,运行命令出现下述错误:

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

解决方案如下:

  1. curl -O http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
  2. tar zxf glibc-2.18.tar.gz
  3. cd glibc-2.18/
  4. mkdir build
  5. cd build/
  6. ../configure --prefix=/usr
  7. make -j2
  8. make install

使用

  1. [root@centos7 gping]# ./gping --help
  2. gping 1.2.6
  3. Ping, but with a graph.
  4. USAGE:
  5. gping [FLAGS] [OPTIONS] <hosts-or-commands>...
  6. FLAGS:
  7. --cmd Graph the execution time for a list of commands rather than pinging hosts
  8. -h, --help Prints help information
  9. -4 Resolve ping targets to IPv4 address
  10. -6 Resolve ping targets to IPv6 address
  11. -s, --simple-graphics Uses dot characters instead of braille
  12. -V, --version Prints version information
  13. OPTIONS:
  14. -b, --buffer <buffer> Determines the number of seconds to display in the graph. [default: 30]
  15. -n, --watch-interval <watch-interval> Watch interval seconds (provide partial seconds like '0.5'). Default for
  16. ping is 0.2, default for cmd is 0.5.
  17. ARGS:
  18. <hosts-or-commands>... Hosts or IPs to ping, or commands to run if --cmd is provided.

它还可以同时对多个目标地址进行操作。
ping命令可视化工具—gping - 图3