[libvirt-users] how to read the libvirt log file

Eric Blake eblake at redhat.com
Wed Jul 23 21:33:48 UTC 2014


On 07/23/2014 01:48 PM, Yuanzhen Gu wrote:
> Hi folks,
> 
> 
> I need to trace how libvirt talk with qemu monitor, log everything when
> give command, but does anyone know what the format, and how to read the log
> file?
> 
> for example:
> 2014-07-22 17:25:22.984+0000: 18571: debug : qemuMonitorIOProcess:356 :
> QEMU_MONITOR_IO_PROCESS: mon=0x7f733c000a40 buf={"timestamp": {"seconds":
> 1406049922, "microseconds": 983916}, "event": "STOP"}
> 
> where to find the qemuMonitorIOProcess function, and what :356 means?
> Thanks very much!

If you have libvirt.git checked out:

$ git grep -l qemuMonitorIOProcess | cat
src/qemu/qemu_monitor.c

Now look at line 356 of that file (assuming you have libvirt.git at the
same commit level as the binary you are reading the log from; earlier in
the log, but snipped from your mail, was a message stating which version
of libvirt you running).  If you matched the right source, then that
line will be in the middle of qemuMonitorIOProcess, and it is logging
the QMP event that libvirt received from qemu at that time.  The buf=
parameter contains the JSON string that you would have to parse yourself
if you were directly connected to the qemu QMP monitor, instead of
having libvirt in the middle.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140723/02fa91bd/attachment.sig>


More information about the libvirt-users mailing list