Re: [squid-users] squid -k rotate does not work

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 30 Sep 2008 23:53:27 +1300

Platoali wrote:
> Hi,
> I've a problem with squid log rotatation.
>
> here is the content of my /var/log/squid:
>
> # ls -l
> total 16940
> -rw-r----- 1 proxy proxy 661760 Sep 30 10:26 access.log
> -rw-r----- 1 proxy proxy 8104 Sep 30 10:26 cache.log
> -rw-r----- 1 proxy proxy 13429584 Sep 30 10:26 cache0
> -rw-r----- 1 proxy proxy 1468800 Sep 30 10:26 cache1
> -rw-r----- 1 proxy proxy 790704 Sep 30 10:22 cache2
> -rw-r----- 1 proxy proxy 246672 Sep 30 10:22 cache3
> -rw-r----- 1 proxy proxy 687345 Sep 30 10:26 store.log
>
>
> when I issue the command:
>
> #squid -k rotate
>
> and then list the directory:
>
> # ls -l
> total 17192
> -rw-r----- 1 proxy proxy 776750 Sep 30 10:27 access.log
> -rw-r----- 1 proxy proxy 8680 Sep 30 10:27 cache.log
> -rw-r----- 1 proxy proxy 13432272 Sep 30 10:27 cache0
> -rw-r----- 1 proxy proxy 0 Sep 30 10:27 cache0.last-clean
> -rw-r----- 1 proxy proxy 1468704 Sep 30 10:27 cache1
> -rw-r----- 1 proxy proxy 0 Sep 30 10:27 cache1.last-clean
> -rw-r----- 1 proxy proxy 790704 Sep 30 10:27 cache2
> -rw-r----- 1 proxy proxy 0 Sep 30 10:27 cache2.last-clean
> -rw-r----- 1 proxy proxy 246672 Sep 30 10:27 cache3
> -rw-r----- 1 proxy proxy 0 Sep 30 10:27 cache3.last-clean
> -rw-r----- 1 proxy proxy 822761 Sep 30 10:27 store.log
>
>
> The access.log and and cache.log didn't rotate.
>
> The is nothing in the cache.log:
>
> 2008/09/30 10:27:02| storeDirWriteCleanLogs: Starting...
> 2008/09/30 10:27:02| 65536 entries written so far.
> 2008/09/30 10:27:02| 131072 entries written so far.
> 2008/09/30 10:27:02| 196608 entries written so far.
> 2008/09/30 10:27:02| 262144 entries written so far.
> 2008/09/30 10:27:02| 327680 entries written so far.
> 2008/09/30 10:27:02| Finished. Wrote 332030 entries.
> 2008/09/30 10:27:02| Took 0.1 seconds (3188457.3 entries/sec).
> 2008/09/30 10:27:02| logfileRotate: /var/log/squid/store.log
> 2008/09/30 10:27:02| logfileRotate: /var/log/squid/access.log
>
>
> here is the permissions for squid directory:
>
> # ls -l | grep squid
> drwxr-xr-x 2 proxy proxy 4096 Sep 30 10:27 squid
>
>
> does any one have any clue?

What release of squid?

In order of easy checking:

Does your squid.conf contain "logfile_rotate 0"?
NP: this is needed for cron and logrotate.d rotation. But it makes
manual runs tricky.

Does your squid.pid file contains the right PID for the currently
running squid?
http://wiki.squid-cache.org/SquidFaq/TroubleShooting#head-fa2a8d93db2ab1c414c4d0e71106ce871d2087e1

Amos

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9
Received on Tue Sep 30 2008 - 10:53:43 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 30 2008 - 12:00:04 MDT