Check if a web server is down
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Web Servers General Talk > Check if a web server is down




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Check if a web server is down  
Lax


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-01-04 01:33 AM

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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:14 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register