gping

一个图形化的 ping 工具

简介

gping

Ping, but with a graph

Apple




仓库地址https://github.com/orf/gping
文档https://github.com/orf/gping/blob/master/readme.md

功能

  • 绘制多台主机的 ping 时间图
  • 通过 --cmd 标志绘制命令执行时间图
  • 自定义颜色
  • 支持 Windows MacLinux

安装

shell
1
2
3
4
pacman -S gping

# 或
yay -S gping

shell
1
apk add gping

shell
1
sudo apt install gping

shell
1
sudo apt install gping
shell
1
brew install gping
shell
1
choco install bat

shell
1
scoop install bat

Release页面 下载对应版本

选项参数

shell
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$ 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
          Uses dot characters instead of braille
      --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
  -h, --help
          Print help
  -V, --version
          Print version

参考