Menu

#1 add -o option

open
nobody
None
5
2007-05-12
2007-05-12
Anonymous
No

add -o option similar to bsd ping which does

-o Exit successfully after receiving one reply packet

This is useful when using -c <N> (no of packets) [OR] -l (looping) option to exit after the first succesful packet.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I believe it already does this... According to the docs, it will round-robin through the list of hosts you've specified, and as the an acknowledgment comes in, it marks it complete. When the list is complete, it exits. Thus, if you ping one site, if it receives 1 successful packet, it will exit, as you've suggested.

    That's the beauty of fping.

     
  • Nobody/Anonymous

    Logged In: NO

    I don't this it does it.

    observe:
    >fping -c 5 www.google.com
    www.google.com : [0], 84 bytes, 324 ms (324 avg, 0% loss)
    www.google.com : [1], 84 bytes, 320 ms (322 avg, 0% loss)
    www.google.com : [2], 84 bytes, 323 ms (322 avg, 0% loss)
    www.google.com : [3], 84 bytes, 322 ms (322 avg, 0% loss)
    www.google.com : [4], 84 bytes, 319 ms (322 avg, 0% loss)

    www.google.com : xmt/rcv/%loss = 5/5/0%, min/avg/max = 319/322/324
    >

    After the first succesful echo, it still sends the packets.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.