Re: [squid-users] Cache manager - 2 questions

From: Magali Bernard <Magali.Bernard@dont-contact.us>
Date: Tue, 14 Feb 2006 09:46:18 +0100

Le 13/02/2006, Henrik Nordstrom <hno@squid-cache.org> a dit:

> On Mon, 13 Feb 2006, Magali Bernard wrote:
>
> > I have noticed that cachemgr.cgi gives no more value but 0 (zero) for
> > Maximum Resident Size. Could it be something in squid configuration ?
>
> Not configuration related.. most likely OS/libc issue.
>
> What does the following small C program report on your system:
>
> --- cut here ---
> #include <sys/time.h>
> #include <sys/resource.h>
> #include <string.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char **argv)
> {
> char *p = malloc(1024 * 1024);
> struct rusage ru;
> int i;
> memset(p, 0, 1024 * 1024);
> memset(&ru, 0, sizeof(ru));
> getrusage(RUSAGE_SELF, &ru);
> printf("My Maximum Resident size: %d\n", (int)ru.ru_maxrss);
> }
> --- cut here ---
>
> save as rsstest.c, then
>
> gcc -o rsstest rsstest.c
> ./rsstest
>
> My bet is that this too reports 0, where it certainly is larger...

And of course you're right.
I'm running Debian Woody (old stable) with libc6 (Provides: glibc-2.2.5-11.8)
Hope Debian Sarge (stable) will solve the problem.

> > Second, giving the next config, I thought I could not access to
> > Cache Manager from a browser outside "localhost": I do, after
> > providing authentication (manager/password). Is it normal ?
>
> Depends on your http_access rules, and what you refer to...
>
> The access controls in Squid restricts where cachemgr.cgi may be running,
> not who may use cachemgr.cgi. Defaults to only allow access to
> cachemgr.cgi running on the same box (i.e. web server on same box as
> Squid).

This point I didn't understand at all.

> The more interesting access controls on who may call the cachemgr.cgi
> application is in your web server where you call the cachemgr.cgi
> application, not Squid.
>
> When both conditions (user allowed by webserver to call the cachemgr.cgi,
> and whe webserer allowed by Squid to use the cachemgr functions) are
> fulfilled the cachemgr_password settings in squid.conf further restricts
> access by requiring a "secret" password as per your squid.conf.

Now it's clear for me that these controls are the most important.
Fortunately they already exist.

Thanks a lot,

> Regards
> Henrik
>

-- 
______________________________________________________________________
Magali BERNARD - Centre de Ressources Informatiques Télécom et Réseaux
Université Jean Monnet de Saint-Étienne - FRANCE
A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting annoying in email?
Received on Tue Feb 14 2006 - 01:46:26 MST

This archive was generated by hypermail pre-2.1.9 : Wed Mar 01 2006 - 12:00:03 MST