X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=libvirt%2Flibvirt.ml;h=ce1878a6d83320219ea6262f3cd67d64a0330f5e;hb=380f1e05b244ae4750ca5101b5b5a182dcd0d1fd;hp=1be023dc0db1fc1100ae988a2844d8e90fb71bec;hpb=ca9a3227f9937f9cdeb84126f1c74502c9a25047;p=ocaml-libvirt.git diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml index 1be023d..ce1878a 100644 --- a/libvirt/libvirt.ml +++ b/libvirt/libvirt.ml @@ -392,6 +392,27 @@ struct tx_drop : int64; } + type get_all_domain_stats_flag = + | GetAllDomainsStatsActive + | GetAllDomainsStatsInactive + | GetAllDomainsStatsOther + | GetAllDomainsStatsPaused + | GetAllDomainsStatsPersistent + | GetAllDomainsStatsRunning + | GetAllDomainsStatsShutoff + | GetAllDomainsStatsTransient + | GetAllDomainsStatsBacking + | GetAllDomainsStatsEnforceStats + + type stats_type = + | StatsState | StatsCpuTotal | StatsBalloon | StatsVcpu + | StatsInterface | StatsBlock | StatsPerf + + type 'a domain_stats_record = { + dom : 'a t; + params : typed_param array; + } + (* The maximum size for Domain.memory_peek and Domain.block_peek * supported by libvirt. This may change with different versions * of libvirt in the future, hence it's a function. @@ -446,6 +467,8 @@ struct external block_peek : [>`W] t -> string -> int64 -> int -> string -> int -> unit = "ocaml_libvirt_domain_block_peek_bytecode" "ocaml_libvirt_domain_block_peek_native" external memory_peek : [>`W] t -> memory_flag list -> int64 -> int -> string -> int -> unit = "ocaml_libvirt_domain_memory_peek_bytecode" "ocaml_libvirt_domain_memory_peek_native" + external get_all_domain_stats : 'a Connect.t -> stats_type list -> get_all_domain_stats_flag list -> 'a domain_stats_record array = "ocaml_libvirt_domain_get_all_domain_stats" + external const : [>`R] t -> ro t = "%identity" let get_domains conn flags =