Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Net::Ping::External doesn't honor timeout or count

Reply
Thread Tools

Net::Ping::External doesn't honor timeout or count

 
 
Stuart Kendrick
Guest
Posts: n/a
 
      08-27-2004
hi,

i'm using Net:ing::External to do my pings. i would like to fiddle
with its 'timeout' and 'count' parameters ... but i don't seem to be
able to. no matter how i set them, i get the same results: a timeout
of 10 seconds and a count of 1.

#!/usr/bin/perl
use strict;
use warnings;
use Net:ing::External qw(ping);

my @hosts = qw/140.107.200.250 140.107.200.251 140.107.200.252/;
for my $host (@hosts) {
if (ping ( hostname => $host,
timeout => '1',
count => '1'
)
) {
print "$host is alive\n";
}
else {
print "$host is dead\n";
}
}

i've replicated this issue in the following environments:
perl-5.8.5, Net-Ping-External-v0.11, SuSE 9.1
perl-5.8.3, Net-Ping-External-v0.11, SuSE 8.2

has anyone else seen this issue?

--sk

stuart kendrick
fhcrc
 
Reply With Quote
 
 
 
 
John W. Krahn
Guest
Posts: n/a
 
      08-27-2004
Stuart Kendrick wrote:
>
> i'm using Net:ing::External to do my pings. i would like to fiddle
> with its 'timeout' and 'count' parameters ... but i don't seem to be
> able to. no matter how i set them, i get the same results: a timeout
> of 10 seconds and a count of 1.


Since Net:ing::External is just using your system's ping command have you
tried running ping with qx//? Have you read the man page for ping?

man ping



John
--
use Perl;
program
fulfillment
 
Reply With Quote
 
 
 
 
Stuart Kendrick
Guest
Posts: n/a
 
      08-27-2004
ahhh, RTFM ... or RTFC ...

i've modified my copy of Net:ing::External to accept the "-W"
argument ... thanx bill,

--sk

Bill <> wrote in message news:<1MednWQL--Y9IbPcRVn->...
> Stuart Kendrick wrote:
>
> > hi,
> >
> > i'm using Net:ing::External to do my pings. i would like to fiddle

[...]

>
> Yes, with Mandrake. But:
>
> From the docs:
> -----------------------
> Linux
>
> Tested OK on Debian 2.2 and Redhat 6.2. It appears that different
> versions of Linux use different versions of ping, which support
> different options. Not sure how I'm going to resolve this yet; for now,
> all the options but count are disabled.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET does not honor Title nor Javscript options Benton ASP .Net 4 11-26-2005 02:45 PM
OT Friday: In honor of Tom Delay Ben Smith MCSE 1 10-21-2005 12:58 AM
IE doesn't honor Cache-control with location.href= calls Jure Erznoznik HTML 3 08-10-2005 01:07 AM
Making headers honor images? Jan Danielsson HTML 8 07-25-2005 04:46 PM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57