Re: swap.state entries.

From: Dancer <dancer@dont-contact.us>
Date: Wed, 20 Jan 1999 17:27:53 +1100

Jim Robertson wrote:
>
> Hello to all,
>
> In Squid 1.1.20 I have a perl script that extracts URL and filesize
> information from the swap log file and being a text file this is fairly
> straight forward.
>
> The trouble is though that in Squid 2.X, the swap log file (swap.state) is
> now in a binary format.
>
> Looking for an alternative method, I found the "All Cache Objects" option in
> cachemgr.cgi but it doesn't seem to be listing as it's name suggests all
> objects in the cache (perhaps I misunderstand its meaning).
>
> 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.
>
> Regards,
> Jim...

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.

D
Received on Tue Jan 19 1999 - 23:13:34 MST

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