Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have written small scripts to check servers if they are available and mail me if the server not available. How can I do the same for my Cold Fusion MX server sitting on our Windows 2000 IIS server? Is there an IP address I can fetch or something in the Cold Fusion server I can check to notify me when it is not available?
Here is an example of how I check if servers are available:
use strict; my $serv = '111.222.333.444'; system("/usr/sbin/ping $a > /dev/null");
How would I do this for checking Cold Fusion server availability??

Replies are listed 'Best First'.
Re: Checking if CF server is available
by borisz (Canon) on May 21, 2004 at 11:56 UTC
    perl -MLWP::Simple -e 'print "failed" unless head("http://111.222.333 +.444/apage")'
    Boris
Re: Checking if CF server is available
by dfaure (Chaplain) on May 21, 2004 at 11:13 UTC
    Since you want to know the status of a web server, why don't use LWP in order to send HTTP request to it?