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.
  4. If any error encountered in opening particular user account, it should trigger an email with the appropriate error message.
  5. After successful login, it has to navigate to a link and that link has to be opened in the same page.
  6. If an error comes in opening the page associated with that link, it should trigger an email with the appropriate error message.
  7. 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.

To run the script every one hour, put an entry in cron

0 * * * * <script>

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:

Best regards,
Guillermo

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:

http://user:pass@hostname.com/blah/blah

my username is an E-mail id. At that time how can pass the auth info to webpage from script?

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...