From 2bb6200934090f34f81d1badb9a55f5a86a7fb32 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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