LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2004, 08:59 PM   #1
zael
LQ Newbie
 
Registered: Aug 2003
Posts: 26

Rep: Reputation: 15
Perl Script - Detect if Server up


I would like to have a perl script ping a server and if it is down, display a webpage in full screen indicating its down. once it see that the server is back up it will close out the screen. any ideas?
 
Old 02-09-2004, 11:13 PM   #2
Berng
Member
 
Registered: Dec 2003
Location: Siberia,Russia
Distribution: Basically RedHat
Posts: 34

Rep: Reputation: 15
There is such a property in html <BODY> tag: onLoad. On starting testing the server you print your html page up to(including) BODY tag + some layer, which shows any message you want. When your server responces to your script, you print end of html-code, so onLoad action starts running. And in onLoad action you put this.window.close() javascript action.
You could test server using socket operation in perl, so you will need to know perl, sockets and javascript to do this.
Such an idea
Best Regards,
Oleg.

Last edited by Berng; 02-09-2004 at 11:15 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to detect IDE devices kushalkoolwal Programming 8 09-28-2005 12:15 PM
Perl, script to serve files from another server Ctawp Programming 2 11-26-2004 10:07 PM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 11:22 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 07:25 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 06:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration