Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 100030ms

What 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 program

that 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?

share|improve this question
    
You really want to look into "mtr" –  Wayne Walker Jul 29 at 23:27

1 Answer 1

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 .

http://linux.die.net/man/8/ping

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.