Re: swap.state entries.

From: Daniel Schild <schild@dont-contact.us>
Date: Wed, 20 Jan 1999 08:24:31 +0100

Dancer wrote:
>
> Jim Robertson wrote:
> >
> > Hello to all,
> >
> > The trouble is though that in Squid 2.X, the swap log file (swap.state) is
> > now in a binary format.
...
> > Can anybody please help me with how from a perl script could I extract URL
> > and filesizes from the new binary "swap.state" file?
> > Or otherwise get this info from Squid somehow.
>
> I've been stopped on much the same task, given that (at certain times of
> the day) I need to rapidly assemble a list of the current cache contents
> for a report. My best guess at this point (I haven't had time to get to
> this task) is to keep the store.log and parse through it.
>
> With a little work processing the data (taking care to watch for STORE
> and RELEASE) I figure you can work out what's in the cache.

You may walk over each object in the cache. cache objects now have some
metadata prepended, including the object URL. have a look inside one
object und u'll see.

-- 
Daniel Schild
Service- and Applicationdevelopment
Teleport Sachsen-Anhalt GmbH | RegioCom GmbH
Tel:    ++49 39203 8 2030    | ++49 39203 8 3300
Fax:    ++49 39203 8 2031    | ++49 39203 8 3399
E-Mail: schild@tsa.de        | schild@regiocom.net
S-Mail: Steinfeldstr. 3, 39179 Barleben, Germany
Received on Wed Jan 20 1999 - 00:12:39 MST

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