If you want to test your Squid cache in batch (from a cron command, for
instance), you can use the echoping program, which will tell you (in
plain text or via an exit code) if the cache is up or not, and will
indicate the response times.
It has been very useful to watch our national cache, which had many
performance problems.
echoping 2 BETA (the first version to support HTTP) is in:
ftp://ftp.pasteur.fr/pub/Network/echoping
Examples:
# See if cache is up
% echoping -h http://www.eu.org/ cache.cnrs.fr:3128
Elapsed time: 0.137757 seconds
% echo $status
0
% echoping -h http://www.eu.org/ cache.cnrs.fr:8080
Can't connect to server (Connection refused)
% echo $status
1
# Test response time. We have a hit.
% echoping -n 5 -h http://www.digital.com/ cache.cnrs.fr:3128
Elapsed time: 0.188368 seconds
Elapsed time: 0.109424 seconds
Elapsed time: 0.139425 seconds
Elapsed time: 0.101504 seconds
Elapsed time: 0.105408 seconds
--- Minimum time: 0.101504 seconds (2522 bytes per sec.) Maximum time: 0.188368 seconds (1359 bytes per sec.) Average time: 0.128825 seconds (1987 bytes per sec.) Median time: 0.109424 seconds (2340 bytes per sec.) # A miss: the page wasn't in the cache the first time % echoping -n 5 -h http://www.livingston.com/ cache.cnrs.fr:3128 Elapsed time: 10.884859 seconds Elapsed time: 0.283330 seconds Elapsed time: 0.210600 seconds Elapsed time: 0.241072 seconds Elapsed time: 0.225073 seconds --- Minimum time: 0.210600 seconds (1216 bytes per sec.) Maximum time: 10.884859 seconds (24 bytes per sec.) Average time: 2.368986 seconds (108 bytes per sec.) Median time: 0.241072 seconds (1062 bytes per sec.) # On a Web server with Expires :-( so Squid has to GET-IMS it % echoping -n 5 -h http://www.microsoft.com/ cache.cnrs.fr:3128 Elapsed time: 9.561317 seconds Elapsed time: 2.496443 seconds Elapsed time: 6.258903 seconds Elapsed time: 2.388049 seconds Elapsed time: 5.452595 seconds --- Minimum time: 2.388049 seconds (107 bytes per sec.) Maximum time: 9.561317 seconds (27 bytes per sec.) Average time: 5.231461 seconds (49 bytes per sec.) Median time: 5.452595 seconds (47 bytes per sec.)Received on Tue Nov 26 1996 - 03:12:07 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:38 MST