aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-libvirt/0004-examples-Print-more-stats-in-the-get_all_domain_stat.patch
blob: a4baded24acf4e5aa30c51a5bb948e6aa52c5b97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 2bb6200934090f34f81d1badb9a55f5a86a7fb32 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 28 Mar 2017 13:11:09 +0100
Subject: [PATCH 4/5] examples: Print more stats in the get_all_domain_stats.ml
 example.

Updates commit 380f1e05b244ae4750ca5101b5b5a182dcd0d1fd.
---
 examples/get_all_domain_stats.ml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/examples/get_all_domain_stats.ml b/examples/get_all_domain_stats.ml
index 4375639..cc86da6 100644
--- a/examples/get_all_domain_stats.ml
+++ b/examples/get_all_domain_stats.ml
@@ -40,13 +40,20 @@ let () =
 
   let conn = C.connect_readonly () in
 
-  let what_stats = [D.StatsCpuTotal; D.StatsInterface; D.StatsBlock] in
-  let flags = [D.GetAllDomainsStatsActive; D.GetAllDomainsStatsInactive] in
+  let what = [
+    D.StatsState;
+    D.StatsCpuTotal;
+    D.StatsBalloon;
+    D.StatsVcpu;
+    D.StatsInterface;
+    D.StatsBlock;
+  ] in
+  let who = [] in (* empty list means returns all domains *)
 
   let quit = ref false in
 
   while not !quit do
-    let stats = D.get_all_domain_stats conn what_stats flags in
+    let stats = D.get_all_domain_stats conn what who in
 
     if stats <> [||] then print_stats stats
     else (
-- 
2.9.3