From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Wed, 17 Oct 2007 12:38:09 +0000 (+0100) Subject: Added --script option. X-Git-Tag: 1.0.4~123 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=6116cbd975924cc971e1eff565fee63ced296d5c;p=virt-top.git Added --script option. Rearranged the code so that there are now separate functions to collect the data and update the display. --- diff --git a/virt-top/README b/virt-top/README index 8618fad..ebebbfa 100644 --- a/virt-top/README +++ b/virt-top/README @@ -11,12 +11,18 @@ The code is structured into these files: This is the virt-top program. - The interesting function is called 'redraw', which is responsible - for redrawing the display on each frame. Another interesting - function is 'start_up' which handles all start-up stuff, eg. - command line arguments, connecting to the hypervisor, enabling - curses. The function 'main_loop' runs the main loop and has - sub-functions to deal with keypresses, help screens and so on. + The two interesting functions are called 'collect' and 'redraw'. + + 'collect' collects all the information about domains, etc. + + 'redraw' updates the display on each frame. + + Another interesting function is 'start_up' which handles all + start-up stuff, eg. command line arguments, connecting to the + hypervisor, enabling curses. + + The function 'main_loop' runs the main loop and has sub-functions + to deal with keypresses, help screens and so on. virt_top_xml.ml diff --git a/virt-top/virt-top.1 b/virt-top/virt-top.1 index 3015f1f..d60cc04 100644 --- a/virt-top/virt-top.1 +++ b/virt-top/virt-top.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "VIRT-TOP 1" -.TH VIRT-TOP 1 "2007-09-24" "ocaml-libvirt-0.3.2.8" "Virtualization Support" +.TH VIRT-TOP 1 "2007-10-17" "ocaml-libvirt-0.3.2.9" "Virtualization Support" .SH "NAME" virt\-top \- 'top'\-like utility for virtualization stats .SH "SUMMARY" @@ -231,6 +231,10 @@ Read \fIfilename\fR as the init file instead of the default which is .IP "\fB\-\-no\-init\-file\fR" 4 .IX Item "--no-init-file" Do not read any init file. +.IP "\fB\-\-script\fR" 4 +.IX Item "--script" +Script mode. There will be no user interface. This is most useful +when used together with the \fI\-\-csv\fR and \fI\-n\fR options. .IP "\fB\-\-help\fR" 4 .IX Item "--help" Display usage summary. @@ -336,6 +340,9 @@ Sets batch mode. .IP "\fBsecure\fR \fItrue|false\fR" 4 .IX Item "secure true|false" Sets secure mode. +.IP "\fBscript\fR \fItrue|false\fR" 4 +.IX Item "script true|false" +Sets script mode. .IP "\fBoverwrite-init-file\fR \fIfalse\fR" 4 .IX Item "overwrite-init-file false" If set to \fIfalse\fR then the \fIW\fR key will not overwrite the diff --git a/virt-top/virt-top.pod b/virt-top/virt-top.pod index 3ec0dac..a888d89 100644 --- a/virt-top/virt-top.pod +++ b/virt-top/virt-top.pod @@ -117,6 +117,11 @@ I<$HOME/.virt-toprc>. See also INIT FILE below. Do not read any init file. +=item B<--script> + +Script mode. There will be no user interface. This is most useful +when used together with the I<--csv> and I<-n> options. + =item B<--help> Display usage summary. @@ -257,6 +262,10 @@ Sets batch mode. Sets secure mode. +=item B