[libvirt] Open monitor logs O_APPEND

Guido Günther agx at sigxcpu.org
Thu Dec 4 16:44:30 UTC 2008

On Thu, Dec 04, 2008 at 01:26:40PM +0000, Daniel P. Berrange wrote:
> On Thu, Dec 04, 2008 at 02:11:07PM +0100, Guido G?nther wrote:
> > Hi,
> > attached patch is from Debian Bug #507553:
> > 
> > The logfile is opened with O_APPEND (to make logrotate work with
> > copytruncate) and without O_TRUNC (to not lose log information e.g. with
> > stop and start of a VM).
> > 
> > Using collectd or munin to monitor VMs creates quiet a bit of qemu
> > monitor output so the ability to use logrotate makes a lot of sense to
> > me.
> And is there a corresponding logrotate config file from Debian we
> can use ?  If we're going to let log files append, then we need to
> ship a logrotate config by default too.
I've changed the patch to only use O_APPEND as root so we don't fill up
the user's log when running as qemu:///session

> ACK if we add a logrotate config too
New version attached. O.k. to apply?
 -- Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-handle-qemu-monitor-logs-via-logrotate.patch
Type: text/x-diff
Size: 3107 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081204/656adbc5/attachment-0001.bin>

More information about the libvir-list mailing list