in reply to shell execution question

The SSH part aside you might want to do something like
#!/usr/bin/perl -w use Net::Ping; use strict; my @hosts = qw(www.gellyfish.com petunia.gellyfish.com); my $ping = Net::Ping->new('icmp'); foreach my $host ( @hosts ) { if ( $ping->ping($host) ) { print "$host OK\n"; } }
Now the problem with this is that you need root privileges to use the icmp protocol - you could use udp or tcp instead but this is dependent on the echo service being available on the hosts being checked.