Re: Re-checking disk cache

From: Adrian Chadd <adrian@dont-contact.us>
Date: Wed, 11 Oct 2000 15:27:22 +0800

On Wed, Oct 11, 2000, Chemolli Francesco (USI) wrote:
> > > And then some more: I'm using Linux, and I'm an happy
> > > diskd user. I've heard voices of aufs being potentially faster
> > > on Linux, but I can't use it, the SIGUSR* would be
> > > lost and I _need_ logfile rotation.
> > > How hard would it be to implement some other scriptable
> > > control interface? For instance, a named pipe would be
> > > quite OK with squid's overall model, and it would cost only
> > > one FD.
> >
> > Uhm, you mean a control channel to do logfile rotation? Hrm. I think
> > that might be a candidate for a cachemgr + acl option. Look t adding
> > a cachemgr option to do it, it can't be that difficult (look at the
> > code that toggles the offline mode to see how to implement
> > the cachemgr
> > interface) and send patches to -HEAD this way.
>
> Not only logfile rotation, but just basically anything that
> can be done to squid via signals nowadays, and them some more.
>
> cachemgr is fine, but it's not scriptable. Not easily at least.
> Now let's suppose that we designed a tiny protocol that worked like this:
>
> one command per line (commands are terminated by lf, cr is ignored).
> Each command has to be prefixed by the correct cachemgr (or another)
> password.
> Commands are basically wordlists.
> Commands are read from a socket, for instance /var/run/squidctl
>
> To logrotate from a script, you just
> echo "foo logrotate" >/var/run/squidctl
>
> To shutdown
> echo "foo shutdown" >/var/run/squidctl
>
> Two levels of permissions checking: the permissions on the
> socket, AND knowledge of the admin password.
>
> squid -k whatever could be redone to use this interface.

Whats wrong with ..

./client cache_object://localhost/log-rotate

? :-)

Adrian

-- 
Adrian Chadd			"If a butterfly flaps its wings in China,
<adrian@creative.net.au>	    will a woman get naked in Amsterdam?"
				      -- Ashley Penney on Chaos Theory
Received on Wed Oct 11 2000 - 01:27:34 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:42 MST