Andrey Korolyov
2015-Feb-26 14:29 UTC
[libvirt-users] Adding timestamps for all emulator output
Hello, I think it would be useful if libvirt will be able to prefix all messages from emulator pipes with the date stamping, for example I am trying to catch very rare and non-fatal race with virtio-serial-bus: Guest failure in adding device virtio-serial0.0 which is specific to the Windows guests on qemu-kvm. I have supporting infrastructure which can tell me exact times for every action upon this VM, but as bug is not frequent, the continuous monitoring looks like an overkill for a desired goal - find a correlation between emulator event and message from stderr. Patching emulator itself is barely an option, as it is ugly, requires refresh of the running code via loopback migration and completely non-universal, as every hypervisor should be modified seperately. I`d highly appreciate positive consideration for such functionality addition or can write a patch shortly, if needed. Thanks!
Daniel P. Berrange
2015-Feb-26 14:36 UTC
Re: [libvirt-users] [libvirt] Adding timestamps for all emulator output
On Thu, Feb 26, 2015 at 06:29:49PM +0400, Andrey Korolyov wrote:> Hello, > > I think it would be useful if libvirt will be able to prefix all > messages from emulator pipes with the date stamping, for example I am > trying to catch very rare and non-fatal race with > > virtio-serial-bus: Guest failure in adding device virtio-serial0.0 > > which is specific to the Windows guests on qemu-kvm. I have supporting > infrastructure which can tell me exact times for every action upon > this VM, but as bug is not frequent, the continuous monitoring looks > like an overkill for a desired goal - find a correlation between > emulator event and message from stderr. Patching emulator itself is > barely an option, as it is ugly, requires refresh of the running code > via loopback migration and completely non-universal, as every > hypervisor should be modified seperately. > > I`d highly appreciate positive consideration for such functionality > addition or can write a patch shortly, if needed. Thanks!Just set 'log_timestamp' in /etc/libvirt/qemu.conf and QEMU will then include a timestamp in any messages it writes to the stderr log file. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Andrey Korolyov
2015-Feb-26 14:40 UTC
Re: [libvirt-users] [libvirt] Adding timestamps for all emulator output
On Thu, Feb 26, 2015 at 5:36 PM, Daniel P. Berrange <berrange@redhat.com> wrote:> On Thu, Feb 26, 2015 at 06:29:49PM +0400, Andrey Korolyov wrote: >> Hello, >> >> I think it would be useful if libvirt will be able to prefix all >> messages from emulator pipes with the date stamping, for example I am >> trying to catch very rare and non-fatal race with >> >> virtio-serial-bus: Guest failure in adding device virtio-serial0.0 >> >> which is specific to the Windows guests on qemu-kvm. I have supporting >> infrastructure which can tell me exact times for every action upon >> this VM, but as bug is not frequent, the continuous monitoring looks >> like an overkill for a desired goal - find a correlation between >> emulator event and message from stderr. Patching emulator itself is >> barely an option, as it is ugly, requires refresh of the running code >> via loopback migration and completely non-universal, as every >> hypervisor should be modified seperately. >> >> I`d highly appreciate positive consideration for such functionality >> addition or can write a patch shortly, if needed. Thanks! > > Just set 'log_timestamp' in /etc/libvirt/qemu.conf and QEMU will then > include a timestamp in any messages it writes to the stderr log file.Thanks Daniel, this will definitely help me! Anyway, is the more generic way to add timestamps in libvirt for any given hypervisor is not created by a reason, say, incompatibility at some point?
Possibly Parallel Threads
- Re: [libvirt] Adding timestamps for all emulator output
- Re: [libvirt] Adding timestamps for all emulator output
- Re: i686 guest failing to start at 50a2c45 (and earlier versions of 2.1-rc) with pc-i440fx-2.1
- Issue creating vm channel
- Re: Processor usage of qemu process.