Re: Script Required to Check a range of IP's
- From: "DJ Stunks" <DJStunks@xxxxxxxxx>
- Date: 29 Jun 2006 15:38:40 -0700
Timothy Johnson wrote:
You've gotten many good suggestions, but the main problem is that you
are doing a TCP ping, and I'm pretty sure you are expecting the results
to match your ICMP ping.
From the Perldoc:
"You may choose one of six different protocols to use for the ping. The
"tcp" protocol is the default. Note that a live remote host may still
fail to be pingable by one or more of these protocols. For example,
www.microsoft.com is generally alive but not "icmp" pingable."
You should change this line
my $p = Net::Ping->new();
to
my $p = Net::Ping->new("icmp");
and that will make your results match your "manual" ping results.
but the script must then be run as root or suid'd...
-jp
.
- References:
- Script Required to Check a range of IP's
- From: Mazhar
- RE: Script Required to Check a range of IP's
- From: Timothy Johnson
- Script Required to Check a range of IP's
- Prev by Date: Re: Windows XP ppm and perldoc problems
- Next by Date: Re: the FOR Loop in the English Language
- Previous by thread: RE: Script Required to Check a range of IP's
- Next by thread: RE: Script Required to Check a range of IP's
- Index(es):
Relevant Pages
|