Mailinglist Archive: opensuse (4626 mails)

< Previous Next >
Re: [opensuse] syslog stuff
  • From: Darryl Gregorash <raven@xxxxxxxxxxxxx>
  • Date: Thu, 18 Jan 2007 17:18:09 -0600
  • Message-id: <45B00031.30804@xxxxxxxxxxxxx>
On 2007-01-18 16:42, Greg Wallace wrote:
> <snip>
> I do indeed now have a /var/log/firewall file. I took a look at its
> contents and it looks just like what was going into messages. So, maybe
> that is fixed. Now what I'd like to do is rotate out the current huge
> messages file and start with a new one. Can you tell me how to safely do
> that?
As root, run "logrotate -f /etc/logrotate.conf"

That will rotate all logs, even those that do not qualify as per the
logrotate configuration, create new (empty) files for each, and restart
any service that needs to be restarted. Logging will then continue normally.

If you only wish to rotate /var/log/messages but nothing else, create a
file containing the following:

/var/log/messages {
maxage 365
rotate 99
size +4096k
create 640 root root
/etc/init.d/syslog reload

(I actually just extracted this from /etc/logrotate.d/syslog, and
removed all the log file names except /var/log/messages.)

You can name this file anything you wish, filename is as good as any,
and place it anywhere you want, such as /tmp :-)

Then run "logrotate -f /tmp/filename", again as root.

The best way to accelerate a computer running Windows is at 9.81 m/s²

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
This Thread
Follow Ups