10k star! 一个可视化ping命令!

2024-06-12 15:37:01 浏览数 (1)

gpin

带图形化界面的 ping

作用

  • 可以同时ping多个域名或ip
  • 支持Windows, Mac 和 Linux 系统

安装

  1. docker pull ghcr.io/orf/gping:gping-v1.15.1

使用

  1. [root@gentlewok ~]# docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 --help
  2. Ping, but with a graph.
  3. Usage: gping [OPTIONS] [HOSTS_OR_COMMANDS]...
  4. Arguments:
  5. [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.
  6. Options:
  7. --cmd
  8. Graph the execution time for a list of commands rather than pinging hosts
  9. -n, --watch-interval <WATCH_INTERVAL>
  10. Watch interval seconds (provide partial seconds like '0.5'). Default for ping is 0.2, default for cmd is 0.5.
  11. -b, --buffer <BUFFER>
  12. Determines the number of seconds to display in the graph. [default: 30]
  13. -4
  14. Resolve ping targets to IPv4 address
  15. -6
  16. Resolve ping targets to IPv6 address
  17. -i, --interface <INTERFACE>
  18. Interface to use when pinging
  19. -s, --simple-graphics
  20. Uses dot characters instead of braille
  21. --vertical-margin <VERTICAL_MARGIN>
  22. Vertical margin around the graph (top and bottom) [default: 1]
  23. --horizontal-margin <HORIZONTAL_MARGIN>
  24. Horizontal margin around the graph (left and right) [default: 0]
  25. -c, --color <color>
  26. Assign color to a graph entry.
  27. This option can be defined more than once as a comma separated string, and the
  28. order which the colors are provided will be matched against the hosts or
  29. commands passed to gping.
  30. Hexadecimal RGB color codes are accepted in the form of '#RRGGBB' or the
  31. following color names: 'black', 'red', 'green', 'yellow', 'blue', 'magenta',
  32. 'cyan', 'gray', 'dark-gray', 'light-red', 'light-green', 'light-yellow',
  33. 'light-blue', 'light-magenta', 'light-cyan', and 'white'
  34. --clear
  35. Clear the graph from the terminal after closing the program
  36. -h, --help
  37. Print help
  38. -V, --version
  39. Print version

主要参数

  1. -4 解析ipv4
  2. -i 指定某网卡

样例

指定ens33网卡下同时ping 3个域名并解析ip:

代码语言:javascript复制
 docker run --rm -ti --network host ghcr.io/orf/gping:gping-v1.15.1 www.jd.com www.pinduoduo.com www.bytedance.com -4 -i ens33

0 人点赞