Bluehost.com Web Hosting $6.95

Check if a web server is down

This is a discussion on Check if a web server is down within the Windows Web Servers forums, part of the Web Server and Related Forums category; Hello all, I'm working on an 'alert' mechanism which would send a mail to the admins if the web ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-01-2004
Lax
 
Posts: n/a
Default Check if a web server is down

Hello all,
I'm working on an 'alert' mechanism which would send a mail to the
admins
if the web server is down. I plan to do this in Perl's LWP.

Along these lines,
================================================== ================
use LWP::Simple ;
my $chkUrl = get("http://abc.xyz.com");
if ( ! $chkUrl )
{
&mail_the_Admins_the_server_is_down() ;
die "Cant connect: Check if the server is down\n" ;
} else { &do_some_prcessing_here() ;
}
================================================== ================

I expect this piece of code to be used over and over in our services
and want to minimize performance hits that the web server takes on
each check.

Could anyone recommend the best way to check for web server being up
or down without causing major performance issues, please?

Should I use a HEAD request for an URL on the server?
I dont want the script to keep pinging the server.

Thanks for your time,
Lax
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0