From: Richard W.M. Jones Date: Tue, 28 Mar 2017 12:11:09 +0000 (+0100) Subject: examples: Print more stats in the get_all_domain_stats.ml example. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=2bb6200934090f34f81d1badb9a55f5a86a7fb32;p=ocaml-libvirt.git examples: Print more stats in the get_all_domain_stats.ml example. Updates commit 380f1e05b244ae4750ca5101b5b5a182dcd0d1fd. --- 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 (