dannc has asked for the wisdom of the Perl Monks concerning the following question:
i tried to use this feature a million times but im not having any luck. no matter what i try it always fails even when pinging 127.0.0.1
use Net::Ping; $p = Net::Ping->new(); print "$host is alive.\n" if $p->ping($host); $p->close(); $p = Net::Ping->new("icmp"); foreach $host (@host_array) { print "$host is "; print "NOT " unless $p->ping($host, 2); print "reachable.\n"; sleep(1); } $p->close(); $p = Net::Ping->new("tcp", 2); while ($stop_time > time()) { print "$host not reachable ", scalar(localtime()), "\n" unless $p->ping($host); sleep(300); } undef($p); # For backward compatibility print "$host is alive.\n" if pingecho($host);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net:Ping HELP!
by TomDLux (Vicar) on May 29, 2003 at 02:02 UTC | |
by JamesNC (Chaplain) on May 29, 2003 at 03:04 UTC | |
|
Re: Net:Ping HELP!
by hangmanto (Monk) on May 29, 2003 at 04:08 UTC | |
by Anonymous Monk on May 29, 2003 at 04:43 UTC | |
by JamesNC (Chaplain) on May 29, 2003 at 05:24 UTC | |
by daeve (Deacon) on May 29, 2003 at 07:31 UTC | |
by Anonymous Monk on May 29, 2003 at 07:44 UTC |