Can I use ping to see real time drop rates?
I'm pinging a server which is dropping packets. At the end of my ping I see something like:
100 packets transmitted, 85 received, 15% packet loss, time 100030msWhat I'd like to do is run my ping continuously but be able to tell when packets are being dropped.
My first thought is to watch the icmp_seq number and look for missing numbers. I'd like to automate this process via a pipe. Something along the lines of:
ping server.wherever.com | cut --someoptionshere | some other programthat would display output only when packets were dropped (as opposed to when the were received as ping does).
Is there any such sequence of pipes I could do to create this?
11 Answer
You may checkout:
ping -f <ip>
This will do a floodping display a single dot for every sent REQUEST and remove a single dot for every REPLY.
If there is no package loss you wont see anything because the count of REQUEST eq REPLY.
If there is package loss you see more and more .