[SLE] logrotate problem
From: Olsson Mattias (mattias.olsson_at_siemens.com)
Date: 10/31/03
- Previous message: LinuxWorld999: "Re: [SLE] D-LINK DWL-610."
- Next in thread: Charles Philip Chan: "Re: [SLE] logrotate problem"
- Reply: Charles Philip Chan: "Re: [SLE] logrotate problem"
- Reply: Carlos E. R.: "Re: [SLE] logrotate problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: suse-linux-e@suse.com Date: Fri, 31 Oct 2003 09:50:29 +0100
Hi
Hope somebody can help me:)
We specify the rotation of the logfile maillog as follows:
/var/log/maillog {
rotate 7
daily
compress
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>
/dev/null || true
endscript
}
For some reason the command doesn't succeed, i.e. the signal never reaches
the syslog daemon.
Consequently, syslogd will continue to write to a INODE that no longer has a
file pointer
effectively resulting is log data being lost.
However, if the command is modified to:
sleep 1; /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
|| true
the problem disappears.
The easiest way to test this is to do the following commands when
configurating
the logfile /var/log/maillog as given above:
#/usr/sbin/logrotate -f /etc/logrotate.conf
#ls -l /var/log/maillog
Note that the size is 0
#logger -p mail.info -t info TESTING
#ls -l /var/log/maillog
Note that the size is still 0
#/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null`
#logger -p mail.info -t info TESTING
#ls -l /var/log/maillog
Note that the size no longer is 0
Thanks /Mattias
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: LinuxWorld999: "Re: [SLE] D-LINK DWL-610."
- Next in thread: Charles Philip Chan: "Re: [SLE] logrotate problem"
- Reply: Charles Philip Chan: "Re: [SLE] logrotate problem"
- Reply: Carlos E. R.: "Re: [SLE] logrotate problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- RE: FreeBSD 4.7 Syslogs
... # Purchasing database syslog ... The command ps ax displays all the tasks
running on your system. ... manual documentation for the newsyslog command. ...
rotate when the message file size is larger that 100k. ... (freebsd-questions) - Logger messages getting stuck in a buffer somewhere?
... I wrote a perl script to process audit data into something a human can make ...
sense of and then log it to syslog via the "logger" command. ... (comp.unix.questions) - logrotate problem
... For some reason the command doesn't succeed, ... the syslog daemon. ...
#logger -p mail.info -t info TESTING ... (RedHat) - Re: About syslog & syslogd
... > I get problem about the syslog ... > then run the following command
... "logger -pdaemon.debug HelloWorld" ... This will put HelloWorld in alog.log
... (comp.unix.aix) - RE: [fw-wiz] (no subject)
... In a command window the following will export individual lines to a file ...
PS Kiwi Syslog will allow you to filter the logs to different files ... - is there any
other syslog server which could work with the cisco pix ... (Firewall-Wizards)