]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/virtio-balloon-document-stats.patch
bump version to 1.3-10
[pve-qemu-kvm.git] / debian / patches / virtio-balloon-document-stats.patch
CommitLineData
904a90cc
DM
1From: Luiz Capitulino <lcapitulino@redhat.com>
2Subject: [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats
3
4Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
5---
6 docs/virtio-balloon-stats.txt | 87 +++++++++++++++++++++++++++++++++++++++++++
7 1 file changed, 87 insertions(+)
8 create mode 100644 docs/virtio-balloon-stats.txt
9
10diff --git a/docs/virtio-balloon-stats.txt b/docs/virtio-balloon-stats.txt
11new file mode 100644
12index 0000000..139e74d
13--- /dev/null
14+++ b/docs/virtio-balloon-stats.txt
15@@ -0,0 +1,87 @@
16+virtio balloon memory statistics
17+================================
18+
19+The virtio balloon driver supports guest memory statistics reporting. These
20+statistics are available to QEMU users as QOM (QEMU Object Model) device
21+properties via a polling mechanism.
22+
23+Basically, clients first have to enable polling, then they can query the
24+available statistics.
25+
26+There are two control properties and six memory statistics properties.
27+
28+The control properties are:
29+
30+ o stats-polling-interval: polling time interval in seconds, it can be:
31+
32+ > 0 enables polling in the specified interval. If polling is already
33+ enabled, the polling time interval will be changed to the new value
34+
35+ 0 disables polling. Previous polled statistics are still valid and
36+ can be queried.
37+
38+ o stats-last-update: last stats update timestamp, in seconds
39+
40+The following statistics are available, all values are in bytes:
41+
42+ o stat-swap-in
43+ o stat-swap-out
44+ o stat-major-faults
45+ o stat-minor-faults
46+ o stat-free-memory
47+ o stat-total-memory
48+
49+Also, please note the following:
50+
51+ - If a statistic is queried before the timer is enabled or if the guest
52+ doesn't support a particular statistic, an error will be returned
53+
54+ - Previously polled statistics remain available even if the timer is
55+ later disabled
56+
57+ - The polling timer is only re-armed when the guest answers to the
58+ statistics request. This means that if the guest takes too long to
59+ respond (say, a few seconds) this delay will end up being added to the
60+ poll interval. Also, if a (buggy) guest doesn't ever respond, the
61+ statistics won't get updated and the timer disarmed
62+
63+Here are a few examples. The virtio-balloon device is assumed to be in the
64+'/machine/peripheral-anon/device[1]' QOM path.
65+
66+Enable polling with 2 seconds interval:
67+
68+{ "execute": "qom-set",
69+ "arguments": { "path": "/machine/peripheral-anon/device[1]",
70+ "property": "stats-polling-interval", "value": 2 } }
71+
72+{ "return": {} }
73+
74+Change polling to 10 seconds:
75+
76+{ "execute": "qom-set",
77+ "arguments": { "path": "/machine/peripheral-anon/device[1]",
78+ "property": "stats-polling-interval", "value": 10 } }
79+
80+{ "return": {} }
81+
82+Get last update timestamp and free memory stat:
83+
84+{ "execute": "qom-get",
85+ "arguments": { "path": "/machine/peripheral-anon/device[1]",
86+ "property": "stats-last-update" } }
87+
88+{ "return": 1354629634 }
89+
90+{ "execute": "qom-get",
91+ "arguments": { "path": "/machine/peripheral-anon/device[1]",
92+ "property": "stat-free-memory" } }
93+
94+{ "return": 845115392 }
95+
96+Disable polling:
97+
98+{ "execute": "qom-set",
99+ "arguments": { "path": "/machine/peripheral-anon/device[1]",
100+ "property": "stats-polling-interval", "value": 0 } }
101+
102+{ "return": {} }
103--
1041.8.0
105
106
107
108