qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, agl@us.ibm.com
Subject: [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats
Date: Mon, 10 Dec 2012 17:36:13 -0200	[thread overview]
Message-ID: <1355168173-14571-4-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1355168173-14571-1-git-send-email-lcapitulino@redhat.com>

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 docs/virtio-balloon-stats.txt | 87 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 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..139e74d
--- /dev/null
+++ b/docs/virtio-balloon-stats.txt
@@ -0,0 +1,87 @@
+virtio balloon memory statistics
+================================
+
+The virtio balloon driver supports guest memory statistics reporting. These
+statistics are available to QEMU users as QOM (QEMU Object Model) device
+properties via a polling mechanism.
+
+Basically, clients first have to enable polling, then they can query the
+available statistics.
+
+There are two control properties and six memory statistics properties.
+
+The control properties are:
+
+ o stats-polling-interval: polling time interval in seconds, it can be:
+
+   > 0  enables polling in the specified interval. If polling is already
+        enabled, the polling time interval will be changed to the new value
+
+   0    disables polling. Previous polled statistics are still valid and
+        can be queried.
+
+ o stats-last-update: last stats update timestamp, in seconds
+
+The following statistics are available, all values are in bytes:
+
+ o stat-swap-in
+ o stat-swap-out
+ o stat-major-faults
+ o stat-minor-faults
+ o stat-free-memory
+ o stat-total-memory
+
+Also, please note the following:
+
+ - If a statistic is queried before the timer is enabled or if the guest
+   doesn't support a particular statistic, an error will be returned
+
+ - Previously polled statistics remain available even if the timer is
+   later disabled
+
+ - The polling timer is only re-armed when the guest answers to the
+   statistics request. This means that if the guest takes too long to
+   respond (say, a few seconds) this delay will end up being added to the
+   poll interval. Also, if a (buggy) guest doesn't ever respond, the
+   statistics won't get updated and the timer disarmed
+
+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": {} }
-- 
1.8.0

  parent reply	other threads:[~2012-12-10 19:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 19:36 [Qemu-devel] [PATCH 0/3] re-enable balloon stats Luiz Capitulino
2012-12-10 19:36 ` [Qemu-devel] [PATCH 1/3] virtio-balloon: drop old stats code Luiz Capitulino
2012-12-10 19:36 ` [Qemu-devel] [PATCH 2/3] virtio-balloon: re-enable balloon stats Luiz Capitulino
2012-12-10 19:36 ` Luiz Capitulino [this message]
2012-12-11  5:12 ` [Qemu-devel] [PATCH 0/3] " Dietmar Maurer
2012-12-11 11:45   ` Luiz Capitulino
2012-12-11 12:05     ` Dietmar Maurer
2012-12-11 12:10       ` Luiz Capitulino
2012-12-11 12:29     ` Dietmar Maurer
2012-12-11 12:59       ` Luiz Capitulino
2012-12-11 15:14         ` Dietmar Maurer
2012-12-11 17:38           ` mdroth
2012-12-11 18:28             ` Luiz Capitulino
2012-12-11 18:30               ` Luiz Capitulino
2012-12-11 19:07               ` Dietmar Maurer
2012-12-11 19:23                 ` Luiz Capitulino
2012-12-11 19:39                   ` Dietmar Maurer
2012-12-11 19:41                     ` Luiz Capitulino
2012-12-12 13:17                       ` Dietmar Maurer
2012-12-12 13:29                         ` Luiz Capitulino
2012-12-12 13:36                           ` Dietmar Maurer
2012-12-12 13:40                             ` Luiz Capitulino
2012-12-12 13:45                               ` Dietmar Maurer
2012-12-13 12:41                                 ` Luiz Capitulino
2012-12-11 22:26               ` mdroth
2012-12-12  5:56                 ` Dietmar Maurer
  -- strict thread matches above, loose matches on Subject: below --
2012-12-14 15:49 [Qemu-devel] [PATCH v2 " Luiz Capitulino
2012-12-14 15:49 ` [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats Luiz Capitulino
2013-01-18 19:29 [Qemu-devel] [PATCH v3 0/3] re-enable balloon stats Luiz Capitulino
2013-01-18 19:29 ` [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats Luiz Capitulino
2013-01-18 20:00   ` Eric Blake
2013-01-21 11:56     ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1355168173-14571-4-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).