Hello, I got the unpacking fixed!
> > ($metaop,$metapad,$metafilenum,$metatimestamp,$metalastref,$metaexpires,$metalastmod, > $metafilesz,$metarefcount,$metaflags,$metakey) = unpack $binary_layout, > $record; I had my unpack incorrect, it should be ($metaop,$metafilenum,$metatimestamp,$metalastref,$metaexpires,$metalastmod, $metafilesz,$metarefcount,$metaflags,$metakey) = unpack $binary_layout, $record; and then I get for output: <snip> binary_layout: A1 x3 i l l l l l s s A16 recordlen: 48 metaop: ^A metafilenum: 0000001B metatimestamp: 1076866068 metalastref: 1076866068 metaexpires: -1 metalastmod: 1053759007 metafilesz: 3179 metarefcount: 1 <snip> I am not handling the 'op' field correctly, but I will work on that later. But the questions about swap.log and swap.state are still open. > > > > > Most if not all of this information is also logged in swap.log where you > > also have access to the URL etc, provided it's known by Squid at the > > time. > > I would rather use the swap.state data since it has more information, > but I looked at using swap.log. > > I didn't have the cache_swap_log option set in squid.conf, but I turned > it on and pointed to /usr/local/squid/var/logs/swap.log > > I restarted (not reloaded) squid and swap.log.00 got created. When it > first got created, it had the same size as my swap.state file, but as > soon as I went to some sites not cached, the swap.log file updated, but > the swap.state file remained unchanged (both size and timestamp). Are > swap.log and swap.state mutually exclusive? > > Now, I restarted squid again, and still the swap.state file remained > unchanged. So it appears that if I have swap.log enabled, swap.state is > not updated, right? If not, how/when is swap.state updated? > > Also, what is the binary layout for the swap.log? > Thanks, Murrah Boswell
