<div dir="ltr">Thank you very much indeed !<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Best,<div>Yuanzhen</div></div></div>
<br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 5:33 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On 07/23/2014 01:48 PM, Yuanzhen Gu wrote:<br>
> Hi folks,<br>
><br>
><br>
> I need to trace how libvirt talk with qemu monitor, log everything when<br>
> give command, but does anyone know what the format, and how to read the log<br>
> file?<br>
><br>
> for example:<br>
> 2014-07-22 17:25:22.984+0000: 18571: debug : qemuMonitorIOProcess:356 :<br>
> QEMU_MONITOR_IO_PROCESS: mon=0x7f733c000a40 buf={"timestamp": {"seconds":<br>
> 1406049922, "microseconds": 983916}, "event": "STOP"}<br>
><br>
> where to find the qemuMonitorIOProcess function, and what :356 means?<br>
> Thanks very much!<br>
<br>
</div></div>If you have libvirt.git checked out:<br>
<br>
$ git grep -l qemuMonitorIOProcess | cat<br>
src/qemu/qemu_monitor.c<br>
<br>
Now look at line 356 of that file (assuming you have libvirt.git at the<br>
same commit level as the binary you are reading the log from; earlier in<br>
the log, but snipped from your mail, was a message stating which version<br>
of libvirt you running).  If you matched the right source, then that<br>
line will be in the middle of qemuMonitorIOProcess, and it is logging<br>
the QMP event that libvirt received from qemu at that time.  The buf=<br>
parameter contains the JSON string that you would have to parse yourself<br>
if you were directly connected to the qemu QMP monitor, instead of<br>
having libvirt in the middle.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div>