[squid-users] cachemgr.cgi isn't mgr:info ?

Alex Rousskov rousskov at measurement-factory.com
Fri Jul 12 16:32:42 UTC 2024


On 2024-07-12 11:18, Brian Cook wrote:
> Picking up squid again and trying to look at what's going on inside..
> 
> Squid on OpenWRT.. wanted to look at mgr:info for file desc, etc..
> 
> trying to access the cachemgr.cgi.. as this looks like the new squidclient

FWIW, I do not recommend using cachemgr.cgi and squidclient. For various 
reasons, both were recently removed from Squid master/v7. Squidclient 
can be replaced with curl or wget. The best cachemgr.cgi replacement 
depends on many factors; a static HTML file may be the best solution in 
some cases!

Without squidclient, you will need to use absolute URLs like this one:

     http://correct-host-name-or-ip:port/squid-internal-mgr/info

See recent discussions on this mailing list or Bug 5283 for discussions 
about what correct-host-name-or-ip:port to use for these URLs. And if 
you got it working with squidclient, you can see what your squidclient 
was sending, of course.
https://bugs.squid-cache.org/show_bug.cgi?id=5283


> Wasn't working etc..

> Q: So I added 3128 to the Safe_ports.. and then it works..

That solution is probably wrong, even if it works. If you share your 
http_access rules, others may be able to suggest a better solution.


> Q: no password set for cachemgr_passwd.. cachemgr.cgi just open to the 
> world? unsecured?

I cannot help you with cachemgr.cgi (see above). Openness of cache 
manager interface itself depends on your http_access rules (and 
cachemgr_passwd).


> and is Process Filedescriptor Allocation the closest thing?

If you want to know more about a subset of file and socket descriptors 
used by Squid, with per-descriptor information, then, yes, 
mgr:filedescriptors is the right cache manager report.


> I (think) I remember something like max, in use, and something else.. 
> being in mgr:info

Yes, it is still there:

> File descriptor usage for squid:
>         Maximum number of file descriptors:   16000
>         Largest file desc currently in use:     41
>         Number of file desc currently in use:   24
>         Files queued for open:                   0
>         Available number of file descriptors: 15976
>         Reserved number of file descriptors:   100
>         Store Disk files open:                   0


HTH,

Alex.



> fwiw openwrt starts squid with like 4096 max files..
> 
> needed something like this:
> 
> ..
>          procd_set_param file $CONFIGFILE
>          procd_set_param limits nofile="262140 262140"
>          procd_set_param respawn
> ..
> 
> to set the hard and soft limits..
> 
> any better practice than adding 3128 to the 'Safe_ports'? (can't keep 
> that in place..)
> 
> and setting a cachemgr_passwd would be the only thing to secure the cgi?
> 
> (am I missing something else?)
> 
> Thank you in advance.
> 
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> https://lists.squid-cache.org/listinfo/squid-users



More information about the squid-users mailing list