http://www.perlmonks.org?node_id=20878

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

As simple question as possible... seeking good methods of calculating the ping timeout. No CPAN modules for this :(

Originally posted as a Categorized Question.

  • Comment on Is there anything better than Net::Ping ? (need to calculate timeout)

Replies are listed 'Best First'.
Re: Is there anything better than Net::Ping ? (need to calculate timeout)
by ybiC (Prior) on Jul 05, 2000 at 17:40 UTC
    Possibly related - *nix utility bing - "a point-to-point bandwidth measurement tool (hence the 'b'), based on ping." Available for Debian at http://www.debian.org/Packages/stable/net/bing.html, and I think RedHat.

    If you roll your own solution, should probably run several iterations to increase accuracy of answer.

        cheers,
        ybiC
      bing isn't a Perl module, it's a *nix command-line utility. It doesn't exactly answer your question, but might provide relevant info. In my experience, it works fine for slower WAN and dialup links, but is unable to cope with LAN speeds.

      Here's an example of bing between 2 hosts on opposite ends of a 256Kbps frame-relay PVC :

      mail.here.dom:~# bing mail.there.dom BING mail.here.dom (10.20.30.1) and mail.there.dom (10.20.40.1) 44 and 108 data bytes 1024 bits in 3.925ms: 260892bps, 0.003833ms per bit 1024 bits in 5.011ms: 204350bps, 0.004894ms per bit 1024 bits in 5.666ms: 180727bps, 0.005533ms per bit 1024 bits in 5.637ms: 181657bps, 0.005505ms per bit 1024 bits in 3.650ms: 280548bps, 0.003564ms per bit --- mail.here.dom --- bytes out in dup loss rtt (ms): min avg max 44 35 35 0% 0.236 0.257 0.399 108 35 35 0% 0.234 0.239 0.263 --- mail.there.dom --- bytes out in dup loss rtt (ms): min avg max 44 35 35 0% 42.366 44.905 71.570 108 35 35 0% 46.016 56.398 166.923 --- estimated link characteristics --- warning: rtt big host1 0.234ms < rtt small host2 0.236ms estimated throughput 280548bps minimum delay per packet 39.621ms (11115 bits) average statistics (experimental) : packet loss: small 0%, big 0%, total 0% warning: rtt big host1 0.239ms < rtt small host2 0.257ms average throughput 89105bps average delay per packet 42.138ms (11822 bits) weighted average throughput 89105bps resetting after 35 samples. mail.here.dom:~#

      Let me know if I can be of any help.
          cheers,
          ybiC
Re: Is there anything better than Net::Ping ? (need to calculate timeout)
by ybiC (Prior) on Jul 05, 2000 at 17:28 UTC
    Not completely clear on what you're asking, but here goes:

    You may be able to do this with Net::Ping by establishing a positive response from remote host, then reducing timeout until no response (similar to internal operation of traceroute/tracert).

        cheers,     ybiC
      Or by taking the current time before and after the successful ping and subtracting them.
Re: Is there anything better than Net::Ping ? (need to calculate timeout)
by Anonymous Monk on Jul 06, 2000 at 21:53 UTC
    Yeah .. the "establishing a positive response from remote host, then reducing..." method could be used, but it's terribly resource/time consuming...
    Still looking for better method/module...

    Oh my! How would I use this 'bing' module?

    Originally posted as a Categorized Answer.

Re: Is there anything better than Net::Ping ? (need to calculate timeout)
by Anonymous Monk on Jul 14, 2000 at 18:47 UTC

    Re: Is there anything better than Net::Ping ? (need to calculate timeout)

    Originally posted as a Categorized Answer.

Re: Is there anything better than Net::Ping ? (need to calculate timeout)
by Anonymous Monk on Apr 18, 2002 at 05:54 UTC
    Well I just want what ping does for us in our company but try pathping just read about it.

    Originally posted as a Categorized Answer.