From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmjqZ-0004dw-34 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 10:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmjqV-00048z-P9 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 10:49:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmjqV-00048u-Jb for qemu-devel@nongnu.org; Thu, 15 Oct 2015 10:49:31 -0400 Date: Thu, 15 Oct 2015 16:49:28 +0200 From: Kashyap Chamarthy Message-ID: <20151015144928.GA1988@tesla.redhat.com> References: <1444894224-9542-1-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444894224-9542-1-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 0/3] QEMU logging improvements List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: qemu-devel@nongnu.org, Peter Maydell , Luiz Capitulino , Markus Armbruster , Pavel Butsykin On Thu, Oct 15, 2015 at 10:30:21AM +0300, Denis V. Lunev wrote: > The following is done: > - QMP/HMP events are now logged I applied this patch series locally, and tried to test it the below way: Launch a minimal QEMU instance: $ /home/kashyapc/build/build-qemu-upstream/x86_64-softmmu/qemu-system-x86_64 \ -nographic \ -nodefconfig \ -nodefaults \ -m 2048 \ -cpu SandyBridge \ -device virtio-scsi-pci,id=scsi \ -device virtio-serial-pci \ -drive file=./cirros.qcow2,if=virtio,cache=writeback \ -serial stdio \ -D ./output-of-qemu.txt \ -qmp unix:./qmp-sock,server And, issued QMP commands via `qmp-shell`: $ ./qmp-shell /export/qmp-sock Welcome to the QMP low-level shell! Connected to QEMU 2.4.50 (QEMU) (QEMU) query-status {"return": {"status": "running", "singlestep": false, "running": true}} (QEMU) (QEMU) blockdev-snapshot-internal-sync device=virtio0 name=snapshot1 {"return": {}} As we can see, the QMP commands gets successfully invoked, but nothing gets logged to the output-of-qemu.txt file. Maybe because everything is logged onto my stdout of qmp-shell? A couple of related questions: - Is the way I supplied '-D' option correct? If so, why the output-of-qemu.txt file does not get created? _Should_ it? - If I `touch output-of-qemu.txt`, then re-try issuing QMP commmands from 'qmp-shell', still, nothing gets logged to it. Probably because only stderr is supposed to get logged to '-D logfile'? Do I have to turn on any other special knob to take advantage of LOG_CMD/LOG_TIME flags mentioned in your patch[1]? I'm pretty sure I'm missing something. . . [1] http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg03316.html > - timestamp is added to the log message > - arguments of qemu_log/qemu_log_mask are not calculated now if the log > is disabled > > These patches are sent in the hope that it is not too late for QEMU 2.5. > > Logging subsystem in QEMU looks rudimentary to me and should be definitely > improved, f.e. log on stalled NFS could ruin the system completely. Anyway, > it is too late for this at the moment. > > Signed-off-by: Denis V. Lunev > CC: Pavel Butsykin > CC: Markus Armbruster > CC: Luiz Capitulino > CC: Eric Blake > CC: Peter Maydell > > -- /kashyap