logrotate configuration seems wrong

John Meinel john at arbash-meinel.com
Mon Sep 15 09:30:52 UTC 2014


So we are using rsyslog.conf to have it figure out when rotation needs to
be done with:
# Maximum size for the log on this outchannel is 512MB
# The command to execute when an outchannel as reached its size limit
cannot accept any arguments
# that is why we have created the helper script for executing logrotate.
$outchannel
logRotation,{{logDir}}/all-machines.log,512000000,{{logrotateHelperPath}}

I would think that would not require SIGHUP along with having it run the
script at our request.

John
=:->

On Mon, Sep 15, 2014 at 12:13 PM, Stuart Bishop <stuart.bishop at canonical.com
> wrote:

> On 15 September 2014 12:38, John Meinel <john at arbash-meinel.com> wrote:
>
> > 7) "copytruncate" seems the wrong setting for interactive with rsyslog. I
> > believe rsyslog is already aware that the file needs to be rotated, and
> thus
>
> It is only aware if you sent it a HUP signal.
>
> > it shouldn't be trying to write to the same file handle (and thus we
> don't
> > need to truncate in place). I'm not 100% sure on the interactions here,
> but
> > "copytruncate" seems to have an inherent likelyhood of dropping data
> (while
> > you are copying, if any data gets written then you'll miss those last few
> > bytes when you go to truncate, right?)
>
> --
> Stuart Bishop <stuart.bishop at canonical.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140915/e190581a/attachment.html>


More information about the Juju-dev mailing list