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

Discussion in 'Perl Misc' started by Stuart Kendrick, Aug 27, 2004.

  1. hi,

    i'm using Net::ping::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::ping::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
     
    Stuart Kendrick, Aug 27, 2004
    #1
    1. Advertising

  2. Stuart Kendrick wrote:
    >
    > i'm using Net::ping::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::ping::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
     
    John W. Krahn, Aug 27, 2004
    #2
    1. Advertising

  3. ahhh, RTFM ... or RTFC ...

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

    --sk

    Bill <> wrote in message news:<>...
    > Stuart Kendrick wrote:
    >
    > > hi,
    > >
    > > i'm using Net::ping::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.
     
    Stuart Kendrick, Aug 27, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benton
    Replies:
    4
    Views:
    1,141
    Mr Newbie
    Nov 26, 2005
  2. Jan Danielsson

    Making headers honor images?

    Jan Danielsson, Jul 25, 2005, in forum: HTML
    Replies:
    8
    Views:
    416
    Jonathan N. Little
    Jul 25, 2005
  3. Jure Erznoznik
    Replies:
    3
    Views:
    1,162
    Neredbojias
    Aug 10, 2005
  4. Replies:
    0
    Views:
    380
  5. =?Utf-8?B?Sm9zaHVhQmlhZ2lv?=

    aspnet_regiis -pc operation does not honor -size argument (.NET 2.

    =?Utf-8?B?Sm9zaHVhQmlhZ2lv?=, Apr 13, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    457
    =?Utf-8?B?Sm9zaHVhQmlhZ2lv?=
    Apr 13, 2007
Loading...

Share This Page