Mailinglist Archive: opensuse (4626 mails)

< Previous Next >
RE: [opensuse] syslog stuff
On Thursday, January 18, 2007 @ 5:18 PM, Darryl Gregorash wrote:

>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 {
> compress
> dateext
> maxage 365
> rotate 99
> missingok
> notifempty
> size +4096k
> create 640 root root
> sharedscripts
> postrotate
> /etc/init.d/syslog reload
> endscript
>}

>(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.

Thanks for the info. I decided to just rotate all of them. It did httpd2
and syslog and then stopped. I think it tars them up, based on what I saw
in that directory. That being the case, it might take it a while to tar up
that huge messages file. Anyway, this should get me back to a current log
that I can look at that's a manageable size. Thanks for all the help. Now
if I can only get this fsck problem fixed.

Greg W


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

< Previous Next >
This Thread