On Tuesday 10 Dec 2002 H:49 pm, H. Narfi Stefansson wrote:
> On Tuesday 10 December 2002 11:39, john wrote:
> > I tried this on newbie a while ago and got no joy, my /var/log/messages
> > and /var/log/syslog fill up and I have to delete the entries by hand (if
> > I try logrotate -f /var/log/messages I get a terminal full of "error:
> >
> > /etc/logrotate.d contains cron, linuxconf,msec,rpm,sudo,syslog,urpmi,xdm
> > - text files
>
> It is no surprise that "logrotate -f /var/log/messages"  results in a lot
> of errors since you're telling logrotate to use /var/log/messages as the
> control file, which is of course very different from telling logrotate to
> rotate /var/log/messages.
> The command that is in my /etc/cron.daily/logrotate file is:
>
> /usr/sbin/logrotate /etc/logrotate.conf
>
> and you may want to add the -f flag there to force the log rotation, so run
> "/usr/sbin/logrotate -f /etc/logrotate.conf"
>
> If this does not rotate your /var/log/messages, have a look at the file
> that controls that, namely /etc/logrotate.d/syslog.
> [I presume that you saw the include line in your /etc/logrotate.conf file,
> it included all the files in the /etc/logrotate.d directory]
>
> Narfi.

Thanks to all who replied, I will add the -f flag to my 
/etc/cron.daily/logrotate script and see how it goes.
I will also go back to man logrotate and study it later today, I had read it 
but completely missed the point that I should be using logrotate.conf rather 
than /messages.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to