echoping
v0.3.0
Um utilitário de rede golang que usa mensagens TCP/UDP-Datagram/QUIC para detectar a estabilidade da rede.
É difícil detectar problemas de rede na vida real.
echoping
usa protocolos TCP e UDP (Datagram ou QUIC) em vez do ICMP usado pelo ping
tradicional e envia mensagens com mais frequência.
echoping
funciona mais como um aplicativo de rede real e relata problemas de rede como se fossem reais.
echoping
com ./echoping -listen IP:PORT
echoping
clientes para usar o servidor echoping
: ./echoping -connect SERVER_IP:SERVER_PORT
echoping
envia solicitações TCP/UDP-Datagram/QUIC para o servidorUso:
-connect string
Connect to 'tcp://ip:port/,udp://ip:port/,quic://ip:port/' (can be repeated, use comma as delimiter), or use 'ip:port' for all TCP/UDP/QUIC
-listen string
Listen both TCP and UDP on ip:port (UDP also works for QUIC)
-listen-tcp string
Listen TCP on ip:port
-listen-udp string
Listen UDP on ip:port (UDP also works for QUIC)
-loss-ratio string
The simulated UDP loss ratio on client side (must be used with "-connect"). "0.1"" means 10% packet loss, "0.1,0.2" means 0.1 for sending and 0.2 for receiving
-payload-size int
The payload size of ping request (default 1300)
-ping-interval duration
The interval between ping requests sent by client (default 20ms)
Saída do servidor:
2020/12/26 01:24:54 server stat udp:127.0.0.1:52032 (20201226-012449.458182): pps=10.0, tmperr=0
2020/12/26 01:24:54 server stat tcp:127.0.0.1:56524 (20201226-012449.458231): pps=10.0, tmperr=0
Saída do cliente:
2020/12/26 01:24:54 client stat udp:127.0.0.1:12345 (20201226-012449.458182): pps=11.0, recv=0.01MB/s, loss=0.0%, round-trip time (ms): avg=0.4, min=0.2, max=0.6, stddev=0.1
2020/12/26 01:24:54 client stat tcp:127.0.0.1:12345 (20201226-012449.458231): pps=11.0, recv=0.01MB/s, loss=0.0%, round-trip time (ms): avg=0.3, min=0.2, max=0.4, stddev=0.1
pps
significa "ping por segundo"loss
de TCP e QUIC é sempre 0% (é claro) ./echoping -listen :12345 -connect 127.0.0.1:12345
Simule pacotes atrasados e descartados no Linux: https://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux