[mythtv-users] Mythbackend.log stops getting written to after logrotate

Robert Tsai rtsai1111 at comcast.net
Mon Jun 27 13:02:23 UTC 2005


On Mon, Jun 27, 2005 at 10:10:21PM +1000, Chris Edwards wrote:
> On 6/27/05, Phill Edwards <philledwards at gmail.com> wrote:
> > > Are you using the copytruncate option in the logrotate entry for
> > > mythtv?
> > 
> > No I haven't been so I will give that a go. Thanks for the
> > suggestion. My mythbackend file for logrotate now looks like this:
> > 
> > /var/log/mythtv/mythbackend.log {
> >     notifempty
> >     missingok
> >     copytruncate
> >     compress
> >     compresscmd /usr/bin/bzip2
> >     uncompresscmd /usr/bin/bunzip2
> >     compressext .bz2
> >     weekly
> > }
> > 
> > Does this look right?
> 
> That looks alright to me. I haven't set it up since I reinstalled my
> mythtv box, so I don't have a working one to give as an example.

This looks syntactically correct, but won't achieve what you want.
Mythbackend still has the logfile open, so even though the logfile has
been truncated, the space will not be returned to the filesystem until
the logfile has been closed (which today requires that mythbackend be
restarted). Until mythbackend is fixed to honor SIGHUP or something to
re-open its logfile, you're stuck.

A workaround would be to re-schedule your daily log rotations
(/etc/crontab) to run at a time when you know you don't have any
recordings, and have your postrotate script restart mythbackend ...

--Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20050627/d68c1e4c/attachment.pgp


More information about the mythtv-users mailing list