Paul's Programming Notes     Archive     Feed     Github

Linux - Ping Not Showing Lost Packets

I was recently troubleshooting some packet loss with ping on linux, and I noticed by default ping won’t explicitly show lost packets:

$ ping x.x.x.x
64 bytes from x.x.x.x: icmp_seq=8 ttl=52 time=18.1 ms
64 bytes from x.x.x.x: icmp_seq=11 ttl=52 time=21.2 ms

(notice the skipped 8-10, those were lost packets)

To fix this, you can add run ping with -O:

$ ping -O x.x.x.x
64 bytes from x.x.x.x: icmp_seq=11 ttl=52 time=19.0 ms
no answer yet for icmp_seq=12
no answer yet for icmp_seq=13
64 bytes from x.x.x.x: icmp_seq=14 ttl=52 time=18.9 ms

Related askubuntu.com Thread