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.
--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (FoxUni) Re: estimating effective connection speed
by Anonymous Monk on Nov 30, 2001 at 02:59 UTC |