X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-ctrl%2Fvc_connections.mli;h=261f85344c24825e161c48fc6a3aa44e3adfaafa;hb=2994c0e3399ce29bc0fe9431574ba1d1e6f59c43;hp=13c1f2092a3d3eae908260059c12fa38a581d34c;hpb=474e8b8e2e98b61d5d01a58f843b9338754ecf2f;p=virt-top.git diff --git a/virt-ctrl/vc_connections.mli b/virt-ctrl/vc_connections.mli index 13c1f20..261f853 100644 --- a/virt-ctrl/vc_connections.mli +++ b/virt-ctrl/vc_connections.mli @@ -41,7 +41,62 @@ val repopulate : GTree.view -> GTree.tree_store -> columns -> state -> state (** Create the GtkTreeView. Returns the widget itself, the model, the list of columns, and the initial state. *) -val make_treeview : ?packing:(GObj.widget -> unit) -> unit -> GTree.view * GTree.tree_store * columns * state +val make_treeview : + ?packing:(GObj.widget -> unit) -> unit -> + GTree.view * GTree.tree_store * columns * state -(** This callback creates the Connect to hypervisor dialog. *) -val open_connection : unit -> unit +(** Open a new connection to the hypervisor URI given. *) +val open_connection : string -> unit + +(** Return the amount of historical data that we hold about a + domain (in seconds). + + The parameters are connection ID (see {!get_conns}) and domain ID. + + This can return from [0] to [86400] (or 1 day of data). +*) +val get_hist_size : int -> int -> int + +(** Return a slice of historical %CPU data about a domain. + + The required parameters are connection ID (see {!get_conns}) + and domain ID. + + The optional [latest] parameter is the latest data we should + return. It defaults to [0] meaning to return everything up to now. + + The optional [earliest] parameter is the earliest data we should + return. This is a positive number representing number of seconds + back in time. It defaults to returning all data. + + The optional [granularity] parameter is the granularity of data + that we should return, in seconds. This defaults to [1], meaning + to return all data (once per second), but you might for example + set this to [60] to return data for each minute. + + This returns an array of data. The first element of the array is + the oldest data. The last element of the array is the most recent + data. The array returned might be shorter than you expect (if + data is missing or for some other reason) so always check the + length. + + Entries in the array are clamped to [0..100], except that if an + entry is [-1] it means "no data". + + This returns a zero-length array if we don't know about the domain. +*) +val get_hist_cpu : ?latest:int -> ?earliest:int -> ?granularity:int -> + int -> int -> + int array + +(** Return a slice of historical memory data about a domain. + + Parameters as above. + + Entries in the array are 64 bit integers corresponding to the + amount of memory in KB allocated to the domain (not necessarily + the amount being used, which we don't know about). +*) +val get_hist_mem : ?latest:int -> ?earliest:int -> ?granularity:int -> + int -> int -> + int64 array