You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Agnello George <ag...@gmail.com> on 2008/03/03 18:54:11 UTC

logrotate query !

hi

I have set up a spamassissin server . I need to rotate  the  logs in the
/var/log/spamd.log file . I added the following  directives in the
/etc/logrotate.conf

# system-specific logs may be also be configured here.
# added by agnello 4 march 08
/var/log/spamd.log {
weekly
compress
rotate 4
}

Well i jsut want to verify what  "rotate 4" really means --- according to
the man pages it says "The *number* of times to rotate a logfile before
removing it."

Also how do i check if these logs are actually going to be compressed and
rotated .

Thanks!! all inputs will really be of great help


-- 
Regards
Agnello Dsouza
www.linux-vashi.blogspot.com
www.bible-study-india.blogspot.com

Re: logrotate query !

Posted by Bob McClure Jr <bo...@bobcatos.com>.
On Tue, Mar 04, 2008 at 09:12:56AM +0530, Agnello George wrote:
> On 3/4/08, Martin Gregorie <ma...@gregorie.org> wrote:
> >
> > On Mon, 2008-03-03 at 17:54, Agnello George wrote:
> > > hi
> > >
> > > I have set up a spamassissin server . I need to rotate  the  logs in
> > > the /var/log/spamd.log file . I added the following  directives in the
> > > /etc/logrotate.conf
> > >
> > > # system-specific logs may be also be configured here.
> > > # added by agnello 4 march 08
> > > /var/log/spamd.log {
> > > weekly
> > > compress
> > > rotate 4
> > > }
> > >
> > > Well i jsut want to verify what  "rotate 4" really means --- according
> > > to the man pages it says "The number of times to rotate a logfile
> > > before removing it."
> > >
> > Sounds pretty straight forward to me - you get the log set:
> >        log
> >        log.1
> >        log.2
> >        log.3
> >        log.4
> >
> So what would happen after "log.4" . would it get deleted frm the system??

Yes, everything ripples down like this:

  log.3 becomes log.4 (the old log.4 falls into the bit bucket)
  log,2 becomes log.3
  log.1 becomes log.2
  log   becomes log.1

and a new log is created.

> -- 
> Regards
> Agnello Dsouza
> www.linux-vashi.blogspot.com
> www.bible-study-india.blogspot.com

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
bob@bobcatos.com             http://www.bobcatos.com
For great is your love, reaching to the heavens; your faithfulness
reaches to the skies.  Psalm 57:10 (NIV)

Re: logrotate query !

Posted by Agnello George <ag...@gmail.com>.
On 3/4/08, Martin Gregorie <ma...@gregorie.org> wrote:
>
> On Mon, 2008-03-03 at 17:54, Agnello George wrote:
> > hi
> >
> > I have set up a spamassissin server . I need to rotate  the  logs in
> > the /var/log/spamd.log file . I added the following  directives in the
> > /etc/logrotate.conf
> >
> > # system-specific logs may be also be configured here.
> > # added by agnello 4 march 08
> > /var/log/spamd.log {
> > weekly
> > compress
> > rotate 4
> > }
> >
> > Well i jsut want to verify what  "rotate 4" really means --- according
> > to the man pages it says "The number of times to rotate a logfile
> > before removing it."
> >
> Sounds pretty straight forward to me - you get the log set:
>        log
>        log.1
>        log.2
>        log.3
>        log.4
>
So what would happen after "log.4" . would it get deleted frm the system??

-- 
Regards
Agnello Dsouza
www.linux-vashi.blogspot.com
www.bible-study-india.blogspot.com

Re: logrotate query !

Posted by Martin Gregorie <ma...@gregorie.org>.
On Mon, 2008-03-03 at 17:54, Agnello George wrote:
> hi 
>  
> I have set up a spamassissin server . I need to rotate  the  logs in
> the /var/log/spamd.log file . I added the following  directives in the
> /etc/logrotate.conf 
>  
> # system-specific logs may be also be configured here.
> # added by agnello 4 march 08
> /var/log/spamd.log {
> weekly
> compress
> rotate 4 
> }
>  
> Well i jsut want to verify what  "rotate 4" really means --- according
> to the man pages it says "The number of times to rotate a logfile
> before removing it."
>
Sounds pretty straight forward to me - you get the log set:
	log 
	log.1 
	log.2 
	log.3
	log.4 

kept with each log moving down the chain before it gets removed.

> Also how do i check if these logs are actually going to be compressed
> and rotated .
>  
Dunno about compression. I don't use it, but visiting /var/log and
looking at file sizes and content after a week or two should show if its
doing what you expect. Or not. Personally, I think rotation on logfile
size is more useful than on time, but ymmv.

Martin