Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Sep 2002 20:15:02 +0200
From:      "Patrick O'Reilly" <bsd@perimeter.co.za>
To:        "David Banning" <david@skytrackercanada.com>, questions@freebsd.org
Subject:   Re: logs take up too much space
Message-ID:  <011201c251e3$81035320$0200000a@perimeter.co.za>
References:  <20020901030500.A89971@skytrackercanada.com>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "David Banning" <david@skytrackercanada.com>

> My logs grow so big that my /var section of the drive gets full.
>
> Is there a way to set the log so that it trims the length of the log?
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

David,

I see some people have already pointed you at newsyslog.  In your case,
where /var is evidently a little small, the option you might be
specifically interested in is '-a'.  This allows you to specify a
directory where the rotated logs will be placed.  By default they all
remain where the logs are.

You will find that the standard /etc/crontab has an entry to run newsyslog
daily.  It looks like this:
---
0  *  *  *  *  root newsyslog
---

If you add the -a argument like so:
---
0  *  *  *  *  root newsyslog -a /another/path/for/rotatedlogs
---

Then the rotated logs will be placed into that path, where you have ample
space.  But the current logs which you might be referring to from time to
time will still be where they usually are, in /var/log .

---
Regards,
Patrick O'Reilly.
    ___        _            __
   / _ )__ __ (_)_ __ ___ _/ /____ __
  / __/ -_) _) /  ~  ) -_), ,-/ -_) _)
 /_/  \__/_//_/_/~/_/\__/ \__/\__/_/
    http://www.perimeter.co.za



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?011201c251e3$81035320$0200000a>