in reply to How to use "$ssh->before()"
If you know the peer IP addresses, use Net::Ping module to ping set of IP addresses,
Ex,
use Net::Ping; my $p = Net::Ping->new("icmp"); my @host_array = (IP1,IP2,IP3...); foreach $host (@host_array) { print "$host is "; print "NOT " unless $p->ping($host, 2); print "reachable.\n"; sleep(1); } $p->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to use "$ssh->before()"
by ww (Archbishop) on Apr 15, 2015 at 11:59 UTC |