Re: How to test if Squid is up?

From: Jonathan Larmour <JLarmour@dont-contact.us>
Date: Tue, 05 Aug 1997 18:21:58 +0100

At 17:33 05/08/97 +0200, MSF on Squidlist wrote:
>
>
>> Does anybody have anytying that will test wether Squid is up
>> and serving requests, not hung, dead etc?
>
>Use tcp-banger requesting a reliable adress. If this fails, call a script
>that dials your modem

Why not just use the "client" program that comes with squid? Stick a script
in cron that runs client for a known reliable web page (e.g. NOT
www.microsoft.com!) and tests the return code - it returns 1 if there's an
error, or timeout.

For a slightly better check, perhaps you may also want to take the output
of the "client" program, and diff it against the output of one you know
that works. It should only differ in the Date: and Last-Modified: fields in
the header for most web pages. Of course, this only works for sites that
you control the output of, otherwise, if the page changes legitimately,
you'll get paged. So you would really have to do this on a web page on a
server you have control of in your site, so this may still not be
completely unrepresentative, as it doesn't give an accurate guide to
internet connectivity.

Jonathan L.

Origin UK,323 Cambridge Science Park,Cambridge,England. Tel: +44(1223)423355
-------[ It is impossible to enjoy idling thoroughly unless one has ]-------
----------------[ plenty of work to do - Jerome K. Jerome ]-----------------
Help fight spam! http://spam.abuse.net/ These opinions are all my own fault
Received on Tue Aug 05 1997 - 10:30:20 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:56 MST