Checking availability of Web pages through Unix script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Checking availability of Web pages through Unix script
# 1  
Old 05-28-2007
Checking availability of Web pages through Unix script

Hi Guru's,

I need to check the availability of a web page for every one hour through a script. Following is the requirement.

1. Go to http://vsn.srivsn.com
2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message.
3. If page opens with out any problem, Login with username vsn nd pwd vsn.
3. If any error encountered in opening particular user account, it should trigger an email with the appropriate error message.
4. After successful login, it has to navigate to a link and that link has to be opened in the same page.
5. If an error comes in opening the page associated with that link, it should trigger an email with the appropriate error message.
6. If everything is successful, an email should be triggered indicating that the site is available.


I need the scheduling options for this to run the script for every one hour. Am new to this and hardly worked on one or two scripts a year back.

Need help.

Thanks in advance,
srivsn.
# 2  
Old 05-28-2007
To run the script every one hour, put an entry in cron

0 * * * * <script>
# 3  
Old 05-28-2007
One tool that will be useful is wget. This is command line tool that is delivered with almost all Linux distributions and you can also get versions for other systems or you can just try to compile it yourself. Just type wget on your command window and see if the system finds it. Otherwise you should have to install it if you think that will be useful and have to rights to do it.

This is one of the several links where you can find more information:
http://www.die.net/doc/linux/man/man1/wget.1.html

Best regards,
Guillermo

Quote:
Originally Posted by srivsn
Hi Guru's,

I need to check the availability of a web page for every one hour through a script. Following is the requirement.

1. Go to http://vsn.srivsn.com
2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message.
3. If page opens with out any problem, Login with username vsn nd pwd vsn.
3. If any error encountered in opening particular user account, it should trigger an email with the appropriate error message.
4. After successful login, it has to navigate to a link and that link has to be opened in the same page.
5. If an error comes in opening the page associated with that link, it should trigger an email with the appropriate error message.
6. If everything is successful, an email should be triggered indicating that the site is available.


I need the scheduling options for this to run the script for every one hour. Am new to this and hardly worked on one or two scripts a year back.

Need help.

Thanks in advance,
srivsn.
# 4  
Old 05-30-2007
passing username and passwd to http page from unix

hi all,

can any one tell me how to pass username and password to an HTML page from UNIX?
I tried with wget. But, there are no options to pass authentication information to webpage.
plz, can any one suggest me how can I do it?

Thanks in advance.................!
Rani
# 5  
Old 05-30-2007
Quote:
Originally Posted by p.yamunarani
hi all,

can any one tell me how to pass username and password to an HTML page from UNIX?
I tried with wget. But, there are no options to pass authentication information to webpage.
plz, can any one suggest me how can I do it?

Thanks in advance.................!
Rani
try:
Code:
http://user:pass@hostname.com/blah/blah

# 6  
Old 05-30-2007
my username is an E-mail id. At that time how can pass the auth info to webpage from script?
# 7  
Old 05-30-2007
I'm just thinking... I don't know if it would work but you may try to type the URL with the login parameters on it. You should look at the source code of the page to see the names of the fields and the URL where the form submits the data. Just an idea...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking SQL DB Availability

Hello everybody. I have a little question. Im creating a script for checking the status of different servers, and everything is running fine except for one thing. I have to check if certain DBs are connectables, I dont care anything else, nor running querys nor updating tables, the only thing I... (4 Replies)
Discussion started by: SeaSoul
4 Replies

2. Shell Programming and Scripting

Get web pages and compare

Hello I'm writing a script to get content of web pages on different machines and compare them using their md5 hash hear is my code #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv01:7051 srv02:7052 srv03:7053 srv04:7054" CLUSTER1_APPLIS="test/version.html test2/version.html... (2 Replies)
Discussion started by: gtam
2 Replies

3. Shell Programming and Scripting

Get web pages and compare

Hello, I'm writing a shell script to wget content web pages from multiple server into a variable and compare if they match return 0 or return 2 #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv1 srv2 srv3 srv4" CLUSTER1_APPLIS="test/version.html test2.version.jsp" # Liste des... (4 Replies)
Discussion started by: gtam
4 Replies

4. Shell Programming and Scripting

Checking Web Pages?

Hey guys, Unfortunatley, I can not use wget on our systems.... I am looking for another way for a UNIX script to test web pages and let me know if they are up or down for some of our application. Has anyone saw this before? Thanks, Ryan (2 Replies)
Discussion started by: rwcolb90
2 Replies

5. Shell Programming and Scripting

Script should keep checking for availability of files.

Hi, I want my script to check for availability of few files contineously for some time. Lets say from 10:00 AM to 10:30 AM script should keep checking on a particular location for each file one by one. If all the files are available then only it should complete the next processing part, else... (2 Replies)
Discussion started by: amit.mathur08
2 Replies

6. Shell Programming and Scripting

Checking availability of service

HI CAN ANY ONE HELP ME FOR BELOW QUESTION CHECKING AVAILABILITY OF SERVICE IN LINUX (2 Replies)
Discussion started by: satheeshkr_cse
2 Replies

7. Shell Programming and Scripting

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (4 Replies)
Discussion started by: dylanmilks
4 Replies

8. IP Networking

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (1 Reply)
Discussion started by: dylanmilks
1 Replies

9. UNIX for Dummies Questions & Answers

Updating and Creating Web pages wiht Unix

I am new to Unix and would like to update a website as well as add new content to the site but it must be done with UNIX. Can anyone give me some pointers as to what types of references are on the web or maybe even some basic commands? Thanks so much! (1 Reply)
Discussion started by: gsensebe
1 Replies

10. UNIX for Dummies Questions & Answers

Dynamic web pages for Unix Web Server

Hi, my company is considering a new development of our web site, which used to run on Apachi over Solaris. The company who is going to do this for us knows only about developing it in ASP. I guess this means we'll have to have another ISS server on NT for these dynamic pages :( What are... (5 Replies)
Discussion started by: me2unix
5 Replies
Login or Register to Ask a Question