35 个稳定版本

1.17.3 2024 年 7 月 21 日
1.16.1 2024 年 2 月 17 日
1.16.0 2023 年 11 月 29 日
1.14.0 2023 年 7 月 31 日
0.1.7 2020 年 11 月 16 日

270网络编程

Download history 65/week @ 2024-04-29 69/week @ 2024-05-06 73/week @ 2024-05-13 58/week @ 2024-05-20 58/week @ 2024-05-27 72/week @ 2024-06-03 56/week @ 2024-06-10 42/week @ 2024-06-17 53/week @ 2024-06-24 43/week @ 2024-07-01 43/week @ 2024-07-08 91/week @ 2024-07-15 852/week @ 2024-07-22 120/week @ 2024-07-29 83/week @ 2024-08-05 64/week @ 2024-08-12

1,175 每月下载量

MIT 许可证

33KB
687

gping 🚀

Crates.io Actions Status

Ping,但带图形。

具有以下超级能力

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

目录

Packaging status

安装 💿

  • macOS
  • Linux (Homebrew): brew install gping
  • CentOS (以及具有旧 glibc 的其他发行版): 从最新版本下载 MUSL 构建
  • Windows/ARM
    • Scoop: scoop install gping
    • Chocolatey: choco install gping
    • GitHub 发布页面 下载最新版本
  • Fedora (COPR): sudo dnf copr enable atim/gping -y && sudo dnf install gping
  • 货物(这需要 rustc 版本 1.67.0 或更高):cargo install gping
  • Arch Linux:pacman -S gping
  • Alpine Linux:apk add gping
  • Ubuntu >23.10/Debian >13:apt install gping
  • Ubuntu/Debian (Azlux的仓库
echo 'deb [signed-by=/usr/share/keyrings/azlux.gpg] https://packages.azlux.fr/debian/ bookworm main' | sudo tee /etc/apt/sources.list.d/azlux.list
sudo apt install gpg
curl -s https://azlux.fr/repo.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/azlux.gpg > /dev/null
sudo apt update
sudo apt install gping
sudo eselect repository enable dm9pZCAq
sudo emerge --sync dm9pZCAq
sudo emerge net-misc/gping::dm9pZCAq
  • FreeBSD
    • pkgpkg install gping
    • ports cd /usr/ports/net-mgmt/gping; make install clean
  • Docker
# Check all options
docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 --help
# Ping google.com
docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 google.com
  • Flox
# Inside of a Flox environment
flox install gping

用法 🎷

只需运行 gping [主机]。如果使用了 --cmd 标志,则 host 可以是一个像 curl google.com 的命令。您还可以使用简写,如 aws:eu-west-1aws:ca-central-1 来ping特定的云区域。目前只支持 aws

$ 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'
  -h, --help
          Print help information
  -V, --version
          Print version information
      --clear
          Clear the graph from the terminal after closing the program

依赖项

~12–22MB
~300K SLoC