in reply to estimating effective connection speed

Well, I was going to direct you to the Net::Ping module, but Net::Ping doesn't actually tell you how long the send/receive cycle took. So, I'd suggest calling ping via the shell and parsing its output:

my $output = grep {/round-trip/} `ping -c N foo.bar`; my ($avg, $stddev) = ($output =~ m|([0-9.]+)/[0-9.]+/([0-9.]+) ms$|); print "Average round-trip time: $avg (standard deviation $stddev)\n";

Or something like that... haven't tested this code.

I'm surprised that my cursory search of CPAN didn't turn up anything that'll do this for you.

--
:wq

Replies are listed 'Best First'.
Re: (FoxUni) Re: estimating effective connection speed
by Anonymous Monk on Nov 30, 2001 at 02:59 UTC
    Important detail I forgot earlier: ping and traceroute are NOT an option due to potential restrictions on the client side (ie, I can't be certain if the client's firewall is blocking outbound ping or traceroute - I don't want to take that chance).

    Thanks for the suggestion, though ;)

    Glenn