I delted 30 from that line. Now it looks like this.

/var/squid/logs/access.log      _squid:_squid   640     14      *
@T00    Z       /var/squid/logs/squid.pid

Now it seems to work

# newsyslog -v -F
/var/cron/log <3Z>: size (KB): 664.08 [10] --> trimming log....
/var/log/authlog <7Z>: age (hr): 435 [168] --> trimming log....
/var/log/daemon <5Z>: size (KB): 26.76 [30] --> trimming log....
/var/log/lpd-errs <7Z>: size (KB): 0.00 [10] --> trimming log....
/var/log/maillog <4Z>: --> trimming log....
/var/log/messages <4Z>: --> trimming log....
/var/log/secure <7Z>: age (hr): 461 [168] --> trimming log....
/var/log/wtmp <7B>: --> trimming log....
/var/log/xferlog <7Z>: size (KB): 0.00 [250] --> trimming log....
/var/log/pflog <3ZB>: size (KB): 1557278.09 [250] --> trimming log....
/var/squid/logs/access.log <14Z>: --> trimming log....




Now I have 2 files in this way.


-rw-r-----  1 _squid  _squid       28668 Jul 13 16:27 access.log
-rw-r-----  1 _squid  _squid    56380324 Jul 13 16:24 access.log.0.gz

Let's see tomorrow morning,



On Mon, Jul 13, 2015 at 4:24 PM, Craig Skinner <skin...@britvault.co.uk>
wrote:

> On 2015-07-13 Mon 13:25 PM |, Indunil Jayasooriya wrote:
> > Hi mics,
> >
> >
> > I want /etc/newsyslog.conf to generate /var/squid/logs/access.log  daily.
> > This is the entry I have added to /etc/newsyslog.conf file. But it does
> NOT
> > work.
> >
> > */var/squid/logs/access.log      _squid:_squid   640     14      *
> > @T00    Z       /var/squid/logs/squid.pid       30*
> >
> >
> > any comments ?
> >
>
> Squid can rotate its own logs.
>
> Search for 'rotate' in squid(8) and 'logfile_rotate' in
> /usr/local/share/examples/squid/squid.conf.documented
> Which says: "It is best to get in the habit of using
> 'squid -k rotate' instead of 'kill -USR1 <pid>'"
>
> I use a monthly _squid cron job like this:
>
>
> # ---------------------- 8< --------------------------
>
> # crontab(5) ENVIRONMENT
> # PATH (& umask) defined in /etc/login.conf
> MAILTO=webmaster
>                 # ENVIRONMENT debug:
> # * * * * *     logname; umask; pwd; printenv | sort
> @monthly        nice -n 20 squid -k rotate || print $?
>
> # ---------------------- 8< --------------------------
>
>
> Edit _squid's crontab with:
>
> $ sudo su -l -s /bin/sh _squid -c 'crontab -e'
>
> Cheers.
> --
> Drugs may be the road to nowhere, but at least they're the scenic route!
>
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
Fonts

Reply via email to