项目作者: blazewicz

项目描述 :
IP (TCP/UDP) ping tools
高级语言: Python
项目地址: git://github.com/blazewicz/ipping-py.git
创建时间: 2020-03-29T12:05:45Z
项目社区:https://github.com/blazewicz/ipping-py

开源协议:MIT License

下载


IP ping

PyPI
PyPI - Status

A ping(8) like network utility allowing use of TCP and UDP packets to measure round-trip and packet loss statistics.

Implemented in minimal-dependency pure Python 3.6+ using asyncio-protocol.

Installation

Get it from pypi

  1. pip install --upgrade ipping

Usage

UDP

Sends UDP packets to a running UDP echo server.

Echo server must be running on the machine we want to ping.

Using socat(1):

  1. socat PIPE UDP-RECVFROM:5554,fork

Run ping test:

  1. $ ipping udp 192.168.20.2 5554 -i 0.5 -s 8176 -c 4
  2. PING 192.168.20.2:5554: 8176 data bytes
  3. 8192 bytes from 192.168.20.2:5554: time=7.476 ms
  4. 8192 bytes from 192.168.20.2:5554: time=7.687 ms
  5. 8192 bytes from 192.168.20.2:5554: time=13.941 ms
  6. 8192 bytes from 192.168.20.2:5554: time=8.448 ms
  7. --- 192.168.20.2:5554 ping statistics ---
  8. 4 packets transmitted, 4 packets received, 0.0% packet loss
  9. round-trip min/avg/max/stddev = 7.476/9.388/13.941/3.064 ms