examples: Print more stats in the get_all_domain_stats.ml example.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Mar 2017 12:11:09 +0000 (13:11 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Mar 2017 12:11:28 +0000 (13:11 +0100)
Updates commit 380f1e05b244ae4750ca5101b5b5a182dcd0d1fd.

examples/get_all_domain_stats.ml

index 4375639..cc86da6 100644 (file)
@@ -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 (