[libvirt] Adding timestamps for all emulator output

Andrey Korolyov andrey at xdel.ru
Thu Feb 26 14:40:11 UTC 2015


On Thu, Feb 26, 2015 at 5:36 PM, Daniel P. Berrange <berrange at 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?




More information about the libvir-list mailing list