[OPEN-ILS-GENERAL] Suggestion for logrotate

Mike Rylander mrylander at gmail.com
Thu Sep 4 16:36:36 EDT 2008


On Thu, Sep 4, 2008 at 2:24 PM, Syd Weidman <s.weidman at uwinnipeg.ca> wrote:
> Hello!
>
> I want to implement a logrotate script for Evergreen (osrfsys.log is more than 2GB already), but I need to know what to put in the postrotate section. For example, in the default logrotate script for apache2, there is this bit:
>
>
>        sharedscripts
>        postrotate
>                if [ -f /var/run/apache2.pid ]; then
>                        /etc/init.d/apache2 restart > /dev/null
>                fi
>        endscript
>
> What provision should be made for getting the opensrf processes to write to the newly rotated logfile? Should I just run:
>
> su -c '/openils/bin/osrf_ctl.sh -c /openils/conf/opensrf_core.xml -a restart_all > /dev/null' opensrf
>

You'll want to use the syslog logging strategy, configured in
opensrf_core.xml.  The direct-to-file logging does not close and
reopen the file as that is considerably slower, and so can't directly
use logrotate.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone: 1-877-OPEN-ILS (673-6457)
 | email: miker at esilibrary.com
 | web: http://www.esilibrary.com


More information about the Open-ils-general mailing list