[rhn-users] syslog / logrotate question
Alfred Hovdestad
alfred.hovdestad at usask.ca
Tue Nov 30 18:39:35 UTC 2004
I added /var/log/slapd to /etc/logrotate.d/syslog.
Alfred Hovdestad
University of Saskatchewan
Jesse Becker wrote:
> On Tue, Nov 30, 2004 at 10:22:08AM -0500, FM wrote:
>
>>Hello
>>my syslog conf :
>># Openldap Server daemon slapd
>>local4.debug /var/log/slapd
>>
>>my logrotate.conf
>>/var/log/slapd {
>> daily
>> rotate 2
>> create 0664 root ldap
>> compress
>>}
>>
>>
>>Every morning I have to restart syslog to allow slapd daemon to populate
>>the slapd log file instead of the messages log
>
>
> The slapd process still has the old filehandle open, even after the files are
> rotated. Thus, you have to kick it to make sure it knows things have changed.
>
>
>>Am I missing something in the config ?
>
>
> Yes, a short section called "postrotate". Try using this section (note the
> last 3 lines):
>
>
> /var/log/slapd {
> daily
> rotate 2
> create 0664 root ldap
> compress
> postrotate
> pkill -HUP slapd
> endscript
> }
>
> Of course, this only works if slapd honors the HUP signal. If you need to
> actually do a full restart, then replace 'pkill -HUP slapd' with a command to
> bounce the service.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users
More information about the rhn-users
mailing list