in reply to Re: Issues with network connectivity and Net::Ping
in thread Issues with network connectivity and Net::Ping

Hi vinoth.ree,

I tried with udp and I still get a timeout.

FloydATC is correct in supposing that I didn't use ICMP to avoid the need to be root.

I'm thinking of going down the direct call route. What do you think?

Like this

my $p = `ping -c 1 www.google.com | grep -i "bytes.*ms"`
And then I either get:
64 bytes from lhr14s21-in-f16.1e100.net (173.194.34.144): icmp_seq=1 t +tl=55 time=549 ms

or ..

ping: unknown host www.google.com

There is a slight delay. But it seems reliable. Any views?

Regards

Steve

Replies are listed 'Best First'.
Re^3: Issues with network connectivity and Net::Ping
by Corion (Patriarch) on Jan 30, 2014 at 13:03 UTC

    Potentially, Net::Ping::External, together with the 'external' protocol should accomplish the same.

      So Net::Ping ::External it is. At least it doesn't rub the delay in your face.

      500 ms is indeed a long time and I'd be delighted to try faster methods of testing connectivity to the Internet. It doesn't need to be a specific server, I just used Google, because it's mostly available when you want it and even if you don't.

      Thanks

      Steve

Re^3: Issues with network connectivity and Net::Ping
by karlgoethebier (Abbot) on Jan 30, 2014 at 13:10 UTC

    IMHO 549ms isn't slight.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      That depends on the carrier, doesn't it?

      -- FloydATC

      Time flies when you don't know what you're doing

        Thank you for advice. I thought it depends on Solar flare

        Karl

        «The Crux of the Biscuit is the Apostrophe»