Search squid archive

Re: Querying cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 5 Oct 2009 16:33:10 -0400, Miguel Cruz <toky.cruz@xxxxxxxxx> wrote:
> Hello all,
> 
> I would like to know if there is a way to query squid for the total
> amount of files that it has in its cache.
> 
> Reason is we are using squid in http_accell mode and if I do a wget on
> "/" I can get a listing of all the files that reside on the docroot
> and all the directories that are there but not of the files inside the
> directories.  So if I was to "massage" the index.html to clear the
> http tags I could get a list that I can count and use to do another
> wget into the directories I find but this seems "over-engineered".
> Instead of getting the required data in 1 connection I would have to
> connect multiple times.
> 
> This is part of my squid.conf file:
> 
> httpd_accel_host 10.x.x.x
> httpd_accel_port 80
> httpd_accel_single_host on
> httpd_accel_with_proxy off
> httpd_accel_uses_host_header off
> 
> Thanks in advanced
> Miguel

To get the number of files in squids cache use SNMP and via the cachemgr
interface (squidclient mgr:info or cachemgr.cgi).

However the problem you describe with "/" URL providing a list of files is
not related to Squid at all. "/" URL is requested from the web server like
any other. It's the same URL browsers fetch when only a domain name is
entered in the address bar.

The results you get back are created by the web server. You describe a
directory listing files stored on the web server. It might be that none of
the files listed there are cacheable and stored in squid at all.


Please seriously consider upgrading your squid though. You will find any
release 2.6 or higher to be much better for reverse-proxy usage. In speed,
capability, and ease of configuration.


Amos

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux