I'm just a beginner in Perl, but I use cron and use Net::Ping for the hosts. I have something similar using perl's DBI to test oracle:
ie, use DBI; $ENV{'ORACLE_SID'}="dummy"; $ENV{'ORACLE_HOME'}="/shared/oracle/product/root1"; yada use DBI; use Net::Ping; @hosts=('host1','host2','192.168.1.3'); foreach $host (@hosts) { $p = Net::Ping->new(); unless ($p->ping($host)) { &error("Error connecting to host: $host\n","warn") ; } $p->close(); } yada yada yada @instances=('dev','prd'); foreach $sid (@instances) { unless($dbh=DBI->connect("dbi:Oracle:$sid","scott","tiger")) { &error("Error connecting to $sid: $DBI::errstr\n","warn"); } if (defined $dbh) { $dbh->disconnect; } } Then email errors, etc. smd +++ [EMAIL PROTECTED] [17/12/04 15:27 -0500]: > Hi all. I would like to write a simple monitoring tool that basically > performs an action on a list of servers (ping, port check, etc) at a > specified time interval. So let's say I want to ping each server every 5 > minutes. I don't want to code a loop where I ping all the servers and then > sleep for 5 minutes, and then start over again. Reason this wouldn't work is > because as the list of servers grows and while some pings may time out, the > actual time to go through the loop once would never be the same. > > So i'm hoping there is some sort of time module that will perform a list of > tasks at a timed interval. While one server may be timing out, it's still > making sure that the others are being checked within the 5 minute time > frame. > > If there is no module to help me with this, can anyone offer any other help, > perhaps if you have done something like this in the past? > > Thanks, > Brian smd ------------------------------ Free bible reading plans: http://triquetra.homelinux.org AIM Screen Name: orclrox ------------------------------ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>