Click here to get back home

Net::Ping - problems with syn proto

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Net::Ping - problems with syn proto nopohack 02-17-2008
Get Chitika Premium
Posted by nopohack on February 17, 2008, 12:02 am
Please log in for more thread options
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!


Posted by Ben Morrow on February 17, 2008, 1:39 am
Please log in for more thread options

>
> 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


Similar ThreadsPosted
ping net pop3 October 21, 2004, 11:22 pm
Win2k - Ping - improved. October 13, 2004, 3:23 pm
improper return value from net::ping? June 6, 2007, 1:13 pm
Net::Ping::External doesn't honor timeout or count August 26, 2004, 8:53 pm
How to read buffered output from ping-like process March 15, 2005, 8:23 pm
LWP problems July 11, 2005, 8:04 pm
LWP-problems December 13, 2005, 2:14 am
help me problems cgi January 14, 2007, 9:42 am
Problems with PAR December 15, 2007, 7:59 am
DBI problems February 11, 2008, 12:11 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap