Networking Forums

Networking Forums > Computer Networking > Linux Networking > wget and testing a website

Reply
Thread Tools Display Modes

wget and testing a website

 
 
steve
Guest
Posts: n/a

 
      06-16-2006, 12:13 AM
I have seen somone use (I think ) wget to poke a web site to test if it
is up and then emails the results to an email address.

i have never used wget and cant seem to see how to do this.

I want to test a particular web site to keep an eye on if it stays up.
Im not an advanced user so want something relatively simple. I can do
the mail part but not sure how to use wget simply to tell me if it
available or off line.

thanks.

 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      06-16-2006, 12:24 AM
On 15 Jun 2006 17:13:53 -0700, steve wrote:
> I have seen somone use (I think ) wget to poke a web site to test if it
> is up and then emails the results to an email address.
>
> i have never used wget and cant seem to see how to do this.
>
> I want to test a particular web site to keep an eye on if it stays up.
> Im not an advanced user so want something relatively simple. I can do
> the mail part but not sure how to use wget simply to tell me if it
> available or off line.


simple

/bin/rm -f .listing
wget --no-remove-listing your/site/here

if [-! -e .listing ] ; then
mail -s "site is not up" (E-Mail Removed)e < /dev/null
fi


for extra points:
http://tldp.org/LDP/abs/html/index.html
 
Reply With Quote
 
steve
Guest
Posts: n/a

 
      06-16-2006, 12:44 AM
> simple
>
> /bin/rm -f .listing
> wget --no-remove-listing your/site/here
>
> if [-! -e .listing ] ; then
> mail -s "site is not up" (E-Mail Removed)e < /dev/null
> fi
>
>
> for extra points:
> http://tldp.org/LDP/abs/html/index.html


Wonderfull thanks.

 
Reply With Quote
 
peter pilsl
Guest
Posts: n/a

 
      06-29-2006, 04:28 PM
steve wrote:
> I have seen somone use (I think ) wget to poke a web site to test if it
> is up and then emails the results to an email address.
>
> i have never used wget and cant seem to see how to do this.
>
> I want to test a particular web site to keep an eye on if it stays up.
> Im not an advanced user so want something relatively simple. I can do
> the mail part but not sure how to use wget simply to tell me if it
> available or off line.
>


you can try something like this too (one line)

echo the site is `wget -O /dev/null THE.URL.com >/dev/null 2>&1 && echo
ok || echo "not ok"` | mail -s "webstatus" (E-Mail Removed)

best,
peter
 
Reply With Quote
 
peter pilsl
Guest
Posts: n/a

 
      06-29-2006, 04:30 PM
>
> you can try something like this too (one line)
>
> echo the site is `wget -O /dev/null THE.URL.com >/dev/null 2>&1 && echo
> ok || echo "not ok"` | mail -s "webstatus" (E-Mail Removed)
>



ähhh ... please note that the spectrum "webpage ist up" and "webpage is
down" ist not sufficient for all pages. there are things like timeout
and pages that forbid wget, pages that forbid frequent access to the
same page and so on ..

best
p
 
Reply With Quote
 
steve
Guest
Posts: n/a

 
      06-29-2006, 05:02 PM
Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wget retry problem/bug ver 1.10.2 wdoe999@yahoo.com Linux Networking 2 03-17-2007 05:16 PM
http response & wget stdazi@gmail.com Linux Networking 4 10-05-2006 05:23 PM
Can wget 'ban' sites? veg_all@yahoo.com Linux Networking 4 10-26-2005 06:22 PM
wget and certificates? Karl Moosberg Linux Networking 7 08-01-2004 06:53 PM
Tool like wget to upload? Jem Berkes Linux Networking 4 12-10-2003 12:06 PM



1 2 3 4 5 6 7 8 9 10 11