From patchwork Fri Dec 18 15:25:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 41409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A7495B6F16 for ; Sat, 19 Dec 2009 02:32:32 +1100 (EST) Received: from localhost ([127.0.0.1]:38281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLeof-0003jg-T1 for incoming@patchwork.ozlabs.org; Fri, 18 Dec 2009 10:32:29 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLehs-000151-2T for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:25:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLehn-00010k-69 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:25:27 -0500 Received: from [199.232.76.173] (port=57997 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLehm-00010R-Oq for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:25:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55443) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLehm-0006H4-7o for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:25:22 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBIFPLBJ002939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Dec 2009 10:25:21 -0500 Received: from localhost (vpn-10-146.rdu.redhat.com [10.11.10.146]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBIFPKJS004902; Fri, 18 Dec 2009 10:25:20 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Fri, 18 Dec 2009 13:25:02 -0200 Message-Id: <1261149905-7622-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1261149905-7622-1-git-send-email-lcapitulino@redhat.com> References: <1261149905-7622-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 4/7] QMP: Update README file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org - Fix output description - Fix command-line usage notes - Minor improvements Signed-off-by: Luiz Capitulino --- QMP/README | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/QMP/README b/QMP/README index 50c31f2..09e7053 100644 --- a/QMP/README +++ b/QMP/README @@ -4,45 +4,57 @@ Introduction ------------- -The QEMU Monitor Protocol (QMP) is a JSON[1] based protocol for QEMU. +The QEMU Monitor Protocol (QMP) allows applications to communicate with +QEMU's Monitor. -By using it applications can control QEMU in reliable and "parseable" way, -QMP also provides asynchronous events support. +QMP is JSON[1] based and has the following features: + +- Lightweight, text-based, easy to parse data format +- Asynchronous events support +- Stability For more information, please, refer to the following files: -o qmp-spec.txt QEMU Monitor Protocol current draft specification +o qmp-spec.txt QEMU Monitor Protocol current specification o qmp-events.txt List of available asynchronous events There are also two simple Python scripts available: o qmp-shell A shell -o vm-info Show some informations about the Virtal Machine +o vm-info Show some information about the Virtual Machine [1] http://www.json.org Usage ----- -To enable QMP, QEMU has to be started in "control mode". This is done -by passing the flag "control" to the "-monitor" command-line option. +To enable QMP, QEMU has to be started in "control mode". There are +two ways of doing this, the simplest one is using the the '-qmp' +command-line option. For example: -$ qemu [...] -monitor control,tcp:localhost:4444,server +$ qemu [...] -qmp tcp:localhost:4444,server Will start QEMU in control mode, waiting for a client TCP connection on localhost port 4444. -To manually test it you can connect with telnet and issue commands: +It is also possible to use the '-mon' command-line option to have +more complex combinations. Please, refer to the QEMU's manpage for +more information. + +Simple Testing +-------------- + +To manually test QMP one can connect with telnet and issue commands: $ telnet localhost 4444 -Trying ::1... +Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. {"QMP": {"capabilities": []}} { "execute": "query-version" } -{"return": "0.11.50"} +{"return": {"qemu": "0.11.50", "package": ""}} Contact -------