Re: [squid-users] reading swap.state file

From: Hussam Al-Tayeb <hussam_at_visp.net.lb>
Date: Mon, 05 Aug 2013 13:45:30 +0300

On Monday 05 August 2013 10:12:41 Amos Jeffries wrote:
> On 5/08/2013 1:11 a.m., Hussam Al-Tayeb wrote:
> > how I can parse swap.state file for inconsistencies?
> > i.e. files referenced in swap.state but not in disk cache.
>
> swap.state is a journal of transactions. It includes references to
> operations that occured on old deleted files as part of its normal
> content. Squid handles any such files without the delete record
> automatically you do not need to worry about it.
>
> > Or files on disk but not referenced in swap.state. it seems squid does not
> > know how to shut down correctly if one of the users is viewing a youtube
> > video.
> What do you mean by that last one? If Squid is shutting down it waits
> shutdown_timeout for clients to finish up (a long video would not do so)
> then terminates all remaining client connections and stops. None of them
> get written to the log, and on restart the corrupted files will be
> overwritten.
>
> Amos

That's not the case here. I have not set shutdown_timeout so it should be the
default. now on kernel updates I need to restart the server.

sometimes I get more files on disk that cache.log says (this very rarely
happens).

And sometimes cache.log claims that swap.state has more referenced files than
actually on disk. This happens almost every single time I squid -k shutdown
then restart my server. Access.log file says the last thing being downloaded is
a youtube video.
Received on Mon Aug 05 2013 - 10:45:34 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 05 2013 - 12:00:17 MDT