Search squid archive

Re: Cache manager - 2 questions

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

 



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...

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).

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.

Regards
Henrik

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

  Powered by Linux