Net::Ping - problems with syn proto

Discussion in 'Perl Misc' started by nopohack, Feb 17, 2008.

  1. nopohack

    nopohack Guest

    Hello,

    I am attempting to use Net::ping as part of a script to validate
    entries in our automount maps. To speed the process of checking the
    mount points, I am using Net::ping to contact the nfs server to make
    sure it is up. I know there are a few entries that reference NFS
    servers that have been decommissioned, which is causing me problems.

    When I try to do a $p->ack($host) and the hostname isn't registered in
    DNS Net::ping dies. Is there a trick to get the ack method to not kill
    my script when the hostname lookup fails?

    Currently I am thinking that I need to DNS lookups on each hostname to
    verify that it resolves, but one would think that attempting to ping a
    non-existant host would return undef.

    TIA!
     
    nopohack, Feb 17, 2008
    #1
    1. Advertising

  2. nopohack

    Ben Morrow Guest

    Quoth nopohack <>:
    >
    > I am attempting to use Net::ping as part of a script to validate
    > entries in our automount maps. To speed the process of checking the
    > mount points, I am using Net::ping to contact the nfs server to make
    > sure it is up. I know there are a few entries that reference NFS
    > servers that have been decommissioned, which is causing me problems.
    >
    > When I try to do a $p->ack($host) and the hostname isn't registered in
    > DNS Net::ping dies. Is there a trick to get the ack method to not kill
    > my script when the hostname lookup fails?


    I can't see any reason that should happen. Can you post a (minimal)
    complete script, together with expected and actual output?

    In general, if a function is dieing when you don't want it to you avoid
    this by wrapping the call in eval {}, but Net::ping->ack shouldn't die
    under normal circumstances.

    Ben
     
    Ben Morrow, Feb 17, 2008
    #2
    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. Philippe Guglielmetti
    Replies:
    3
    Views:
    400
    Victor Bazarov
    Oct 22, 2003
  2. greg
    Replies:
    15
    Views:
    577
    Greg Ewing
    Sep 10, 2004
  3. =?ISO-8859-2?Q?Przemys=B3aw_Staniszewski?=

    Ethernet and TCP/IP proto in vhdl

    =?ISO-8859-2?Q?Przemys=B3aw_Staniszewski?=, Sep 29, 2006, in forum: VHDL
    Replies:
    8
    Views:
    12,780
    alainsan
    Aug 12, 2011
  4. ian

    Proto Question

    ian, Nov 6, 2006, in forum: C Programming
    Replies:
    2
    Views:
    401
    Richard Bos
    Nov 6, 2006
  5. Nicholas Wieland

    SYN scan

    Nicholas Wieland, May 19, 2005, in forum: Ruby
    Replies:
    1
    Views:
    153
    Guillaume Marcais
    May 19, 2005
Loading...

Share This Page