Re: [squid-users] Getting cache statistics

From: Chris Robertson <crobertson@dont-contact.us>
Date: Fri, 16 Feb 2007 10:50:42 -0900

Peters, Noah wrote:
> What I am really trying to do is to write an application that will allow
> me to complex analyses of the efficiency of the squid cache after
> changes are made to the squid configs or to the web server configs.
> And, I am more interested in writing my own app than using one that
> already exists. I really just wanted a way to get the squid performance
> data without using SNMP and thought that it might be possible to do it
> the same way as the cachemgr application does. As I have explored more
> it seems that the cachemgr functionality is actually built into the
> squid application and the cachemgr perl script is just a proxy to show
> the data in a web browser. So, it seems that there is no raw data
> access via any technique other than SNMP.
>
> Thanks -Noah
>
>

Try this:

telnet squidhost 3128
GET cache_object://localhost/menu HTTP/1.0
<enter>

This assumes that Squid is running on "squidhost", is using the default
port and allows cachemgr queries from the host that you telnet from.
There's no black magic. It's just a modified HTTP call. Any thing you
can get via SNMP is available to through the cachemgr, it's just
formatted differently.

Squid does not however keep detailed statistics beyond what is available
in the cache manager (you can't query for 5 minute performance from the
beginning of the previous hour). Using Cacti or MRTG allows you to
store those detailed statistics (and could be perverted to use the TCP
query above to gather those statistics).

Chris
Received on Fri Feb 16 2007 - 12:51:32 MST

This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:01 MST