Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing packet loss rate info #114

Open
kenchou opened this issue Dec 1, 2020 · 8 comments
Open

Missing packet loss rate info #114

kenchou opened this issue Dec 1, 2020 · 8 comments

Comments

@kenchou
Copy link

kenchou commented Dec 1, 2020

ping result:
100 packets transmitted, 81 received, 19% packet loss, time 99425ms

gping missing info of packet loss

@gregsadetsky
Copy link

Seconded! Would be really great to see a different color on the plot for pings that timed out

@skoehler
Copy link

skoehler commented Nov 2, 2023

I'm afraid that gping is running the normal ping command and parses its output. The ping command prints about packet loss only when it terminates. gping should send the ping packets itself, and it should have a configurable timeout after which a packet is counted as lost. Only then gping can give you realtime statistics on how many packets have been dropped in total / over a given time window.

@gregsadetsky
Copy link

I'm not sure that I follow -- ping does print about lost packets as they are being sent... or are we talking about different things?

# I disconnected and reconnected my connection in the middle of this ping session
g@tr repo (main *%) % ping 8.8.8.8 
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=114 time=3.687 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=3.210 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=3.383 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=114 time=3.551 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=114 time=3.513 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=114 time=3.323 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=114 time=3.397 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=114 time=3.511 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=114 time=3.240 ms
ping: sendto: No route to host
Request timeout for icmp_seq 9
ping: sendto: No route to host
Request timeout for icmp_seq 10
ping: sendto: No route to host
Request timeout for icmp_seq 11
ping: sendto: No route to host
[... snip ...]
Request timeout for icmp_seq 21
ping: sendto: No route to host
Request timeout for icmp_seq 22
ping: sendto: No route to host
Request timeout for icmp_seq 23
Request timeout for icmp_seq 24
64 bytes from 8.8.8.8: icmp_seq=25 ttl=114 time=4.090 ms
64 bytes from 8.8.8.8: icmp_seq=26 ttl=114 time=3.192 ms
64 bytes from 8.8.8.8: icmp_seq=27 ttl=114 time=3.433 ms
64 bytes from 8.8.8.8: icmp_seq=28 ttl=114 time=3.272 ms
64 bytes from 8.8.8.8: icmp_seq=29 ttl=114 time=3.199 ms

@skoehler
Copy link

skoehler commented Nov 2, 2023

Which version of ping is that? On Linux, the usual ping from the iputils package doesn't do that. I looked for an option to have that feature. I apparently missed it on my first look. But here it is:

$ ping -O 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) Bytes an Daten.
noch keine Antwort für icmp_seq=1
noch keine Antwort für icmp_seq=2
noch keine Antwort für icmp_seq=3
^C
--- 1.2.3.4 ping-Statistik ---
4 Pakete übertragen, 0 empfangen, 100% packet loss, time 3040ms

$ LANG=C ping -O 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.
no answer yet for icmp_seq=1
no answer yet for icmp_seq=2
no answer yet for icmp_seq=3
no answer yet for icmp_seq=4
no answer yet for icmp_seq=5
^C
--- 1.2.3.4 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5063ms

One problem with that is that it is localized depending on the locale.

@kenchou
Copy link
Author

kenchou commented Nov 5, 2023

I'm afraid that gping is running the normal ping command and parses its output. The ping command prints about packet loss only when it terminates. gping should send the ping packets itself, and it should have a configurable timeout after which a packet is counted as lost. Only then gping can give you realtime statistics on how many packets have been dropped in total / over a given time window.

emm... You're right. It parses the output results of the ping command.

https://github.com/orf/gping/blob/master/pinger/src/linux.rs#L12-L16
https://github.com/orf/gping/blob/master/pinger/src/lib.rs#L42-L53

@topranks
Copy link

topranks commented Jul 3, 2024

Seconded! Would be really great to see a different color on the plot for pings that timed out

Yes this would be really cool. I only discovered the tool and I love it, as a network engineer the really big use-case I have for it is during maintenances to have one screen with an "at-a-glance" view of whether a set of servers/network devices are reachable.

A clear visual indication of a particular target being down (no echo-reply received) would be really useful. Changing to a preset colour to represent this (red?) or altering how the line appears somehow could be good.

But either way love gping excellent work!

@ruppde
Copy link

ruppde commented Sep 11, 2024

One problem with that is that it is localized depending on the locale.

you could just check if the line starts with the ping size and/or ends with a sequence number, that should be language independent.

no answer yet for icmp_seq=1
64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=335 ms

Japanese ping:

 PING 1.1.1.1 (1.1.1.1) 56(84) バイトのデータ
64 バイト応答 送信元 1.1.1.1: icmp_seq=1 ttl=58 時間=16.0ミリ秒
--- 1.1.1.1 ping 統計 ---
送信パケット数 2, 受信パケット数 2, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 14.908/15.472/16.037/0.564 ms```

@krypdoh
Copy link

krypdoh commented Oct 3, 2024

Possible to add the total summary output that the default ping produces when exiting gping (q) ?

Quitting ping produces:
Ping statistics for 127.0.0.1:
Packets: Sent = 9, Received = 9, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants