From patchwork Tue Dec 4 15:04:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 203674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DA1DB2C008C for ; Wed, 5 Dec 2012 02:05:30 +1100 (EST) Received: from localhost ([::1]:56328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu3s-0004op-P5 for incoming@patchwork.ozlabs.org; Tue, 04 Dec 2012 10:05:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu3Z-0004bK-Sn for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:05:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfu3Q-0000cC-1c for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:05:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu3P-0000c2-PE for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:04:59 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB4F4vcr023151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Dec 2012 10:04:57 -0500 Received: from localhost (ovpn-113-104.phx2.redhat.com [10.3.113.104]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB4F4uF2001494; Tue, 4 Dec 2012 10:04:57 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Tue, 4 Dec 2012 13:04:48 -0200 Message-Id: <1354633488-24112-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1354633488-24112-1-git-send-email-lcapitulino@redhat.com> References: <1354633488-24112-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, agl@us.ibm.com Subject: [Qemu-devel] [RFC 3/3] docs: document virtio-balloon stats X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Luiz Capitulino --- docs/virtio-balloon-stats.txt | 73 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 docs/virtio-balloon-stats.txt diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt new file mode 100644 index 0000000..7e7ddc4 --- /dev/null +++ b/docs/virtio-balloon-stats.txt @@ -0,0 +1,73 @@ +virtio balloon memory statistics +================================ + +The virtio balloon driver supports guest memory statistics reporting. These +statistics are available to QEMU users as QOM (QEMU Obejct Model) device +properties via a polling mechanism. + +Basically, clients have to enable polling. Then they can query the available +statistics. + +There are two control properties and six memory statistics from the guest. + +The control properties are: + + o stats-polling-interval: a value greater than zero enables polling + in the specified interval (in seconds). When value equals zero, + polling is disabled. If polling is already enabled and a value + greater than zero is written, the polling interval time is changed + + o stats-last-update: last stats update timestamp, in seconds + +The memory statistics are: + + o stat-swap-in + o stat-swap-out + o stat-major-faults + o stat-minor-faults + o stat-free-memory + o stat-total-memory + +All values are in bytes. A value of -1 means that the statistic isn't +available right now. + +Here are a few examples. The virtio-balloon device is assumed to be in the +'/machine/peripheral-anon/device[1]' QOM path. + +Enable polling with 2 seconds interval: + +{ "execute": "qom-set", + "arguments": { "path": "/machine/peripheral-anon/device[1]", + "property": "stats-polling-interval", "value": 2 } } + +{ "return": {} } + +Change polling to 10 seconds: + +{ "execute": "qom-set", + "arguments": { "path": "/machine/peripheral-anon/device[1]", + "property": "stats-polling-interval", "value": 10 } } + +{ "return": {} } + +Get last update timestamp and free memory stat: + +{ "execute": "qom-get", + "arguments": { "path": "/machine/peripheral-anon/device[1]", + "property": "stats-last-update" } } + +{ "return": 1354629634 } + +{ "execute": "qom-get", + "arguments": { "path": "/machine/peripheral-anon/device[1]", + "property": "stat-free-memory" } } + +{ "return": 845115392 } + +Disable polling: + +{ "execute": "qom-set", + "arguments": { "path": "/machine/peripheral-anon/device[1]", + "property": "stats-polling-interval", "value": 0 } } + +{ "return": {} }