Cache statistics



  • Hi!

    How I am really can check from logs is this working or not? I've used this kind of system years ago with smoothwall and there was an application/web-page for checking cache content & succeed %.



  • Go to console and run:

    squidclient -h PROXY_IP_ADDRESS -p SQUID_PORT mgr:info

    eg. squidclient -h 10.10.4.1 -p 3128 mgr:info



  • Hmm.. that doesn't work for me… (don't know reason) but I ment something like this:



  • Doesn't exist in pfSense.  That looks like RRD Tool being fed squid cache metrics.



  • That screenshot is one part of smoothwall reporting portal…

    All right.. fair enough... I've read here at some modifications of dynamic cache and how they get 20-40% hit rate... How am I able to get some squid stats and efficient statistics = how am I knowing is my configuration good or bad?



  • The command-line I gave you would do it.  You just need to figure out why it didn't work.

    Hmm.. that doesn't work for me… (don't know reason)

    Error messages?  Output?  How does it not work?

    A 20-40% hit rate is probably fantasy unless you're dealing with a lot of static content.  My own tests showed a consistent 4-7% or thereabouts.  Not really worth the hassle.  I gave up trying to use squid to cache and now I use it as the base for squidguard URL filtering.

    Edit:  You likely need to edit your squid config to see the stats I was referring to.

    Go to Services - Squid Proxy Server.  Select Local Cache.  Look for External Cache Managers and set it to:

    pfsense_LAN_IP;127.0.0.1;Your_PC_IP

    For example, if your pfSense LAN IP address (assuming you have squid listening on LAN) is 192.168.10.1 and your PC is 192.168.10.10, then you would edit External Cache Managers to be:

    192.168.10.1;192.168.10.10;127.0.0.1

    Once done and saved, you should be albe to go to

    http://pfsense_LAN_IP:3128/squid-internal-mgr/info

    and see the text metrics.  It will give you relevant data for the past 5 minutes and past hour.  Anything else and you will need something else.



  • Ok, thx… that is not solution I am trying to find...

    Anyway I can check that squid + dynamic caching is working with tail -f command but I am trying to find solution in the long term and I am interested what kind of "savings" I can achieve... Also it would be nice to know what installation packets / images I can found from cache...