Added --script option.
[virt-top.git] / virt-top / virt-top.1
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "VIRT-TOP 1"
132 .TH VIRT-TOP 1 "2007-10-17" "ocaml-libvirt-0.3.2.9" "Virtualization Support"
133 .SH "NAME"
134 virt\-top \- 'top'\-like utility for virtualization stats
135 .SH "SUMMARY"
136 .IX Header "SUMMARY"
137 virt-top [\-options]
138 .SH "DESCRIPTION"
139 .IX Header "DESCRIPTION"
140 virt-top is a \fItop\fR\|(1)\-like utility for showing stats of virtualized
141 domains.  Many keys and command line options are the same as for
142 ordinary \fItop\fR.
143 .PP
144 It uses libvirt so it is capable of showing stats across a variety of
145 different virtualization systems.
146 .SH "OPTIONS"
147 .IX Header "OPTIONS"
148 .IP "\fB\-1\fR" 4
149 .IX Item "-1"
150 Display physical CPUs by default (instead of domains).
151 When virt-top is running, use the \fI1\fR key to toggle
152 between physical CPUs and domains display.
153 .IP "\fB\-2\fR" 4
154 .IX Item "-2"
155 Display network interfaces by default (instead of domains).
156 When virt-top is running, use the \fI2\fR key to toggle
157 between network interfaces and domains display.
158 .IP "\fB\-3\fR" 4
159 .IX Item "-3"
160 Display block devices (virtual disks) by default (instead of domains).
161 When virt-top is running, use the \fI3\fR key to toggle
162 between block devices and domains display.
163 .IP "\fB\-b\fR" 4
164 .IX Item "-b"
165 Batch mode.  In this mode keypresses are ignored.
166 .IP "\fB\-c uri\fR or \fB\-\-connect uri\fR" 4
167 .IX Item "-c uri or --connect uri"
168 Connect to \s-1URI\s0 given.  The default is to connect to the Xen
169 hypervisor.
170 .IP "\fB\-d delay\fR" 4
171 .IX Item "-d delay"
172 Set the delay between screen updates in seconds.
173 The default is 3.0 seconds.  You can change this
174 while virt-top is running by pressing either \fIs\fR or \fId\fR key.
175 .IP "\fB\-n iterations\fR" 4
176 .IX Item "-n iterations"
177 Set the number of iterations to run.  The default
178 is to run continuously.
179 .IP "\fB\-o sort\fR" 4
180 .IX Item "-o sort"
181 Set the sort order to one of:
182 \&\fBcpu\fR (sort by \f(CW%CPU\fR used),
183 \&\fBmem\fR (sort by memory used),
184 \&\fBtime\fR (sort by total time),
185 \&\fBid\fR (sort by domain \s-1ID\s0),
186 \&\fBname\fR (sort by domain name),
187 \&\fBnetrx\fR (sort by network received bytes),
188 \&\fBnettx\fR (sort by network transmitted bytes),
189 \&\fBblockrdrq\fR (sort by block device [disk] read requests),
190 \&\fBblockwrrq\fR (sort by block device [disk] write requests).
191 .Sp
192 While virt-top is running you can change the sort
193 order using keys \fIP\fR (cpu), \fIM\fR (memory),
194 \&\fIT\fR (total time), \fIN\fR (domain \s-1ID\s0),
195 \&\fIF\fR (interactively select the sort field).
196 .IP "\fB\-s\fR" 4
197 .IX Item "-s"
198 Secure mode.  Currently this does nothing.
199 .IP "\fB\-\-hist\-cpu secs\fR" 4
200 .IX Item "--hist-cpu secs"
201 Set the time in seconds between updates of the historical
202 \&\f(CW%CPU\fR at the top right of the display.
203 .IP "\fB\-\-csv file.csv\fR" 4
204 .IX Item "--csv file.csv"
205 Write the statistics to file \fIfile.csv\fR.  First a header is written
206 showing the statistics being recorded in each column, then one line is
207 written for each screen update.  The \s-1CSV\s0 file can be loaded directly
208 by most spreadsheet programs.
209 .Sp
210 Currently the statistics which this records vary between releases of
211 virt-top (but the column headers will stay the same, so you can use
212 those to process the \s-1CSV\s0 file).
213 .Sp
214 Not every version of virt-top supports \s-1CSV\s0 output \- it depends how the
215 program was compiled (see \fI\s-1README\s0\fR file in the source distribution
216 for details).
217 .IP "\fB\-\-debug filename\fR" 4
218 .IX Item "--debug filename"
219 Send debug and error messages to \fIfilename\fR.
220 To send error messages to syslog you can do:
221 .Sp
222 .Vb 1
223 \& virt-top --debug >(logger -t virt-top)
224 .Ve
225 .Sp
226 See also \s-1REPORTING\s0 \s-1BUGS\s0 below.
227 .IP "\fB\-\-init\-file filename\fR" 4
228 .IX Item "--init-file filename"
229 Read \fIfilename\fR as the init file instead of the default which is
230 \&\fI$HOME/.virt\-toprc\fR.  See also \s-1INIT\s0 \s-1FILE\s0 below.
231 .IP "\fB\-\-no\-init\-file\fR" 4
232 .IX Item "--no-init-file"
233 Do not read any init file.
234 .IP "\fB\-\-script\fR" 4
235 .IX Item "--script"
236 Script mode.  There will be no user interface.  This is most useful
237 when used together with the \fI\-\-csv\fR and \fI\-n\fR options.
238 .IP "\fB\-\-help\fR" 4
239 .IX Item "--help"
240 Display usage summary.
241 .SH "KEYS"
242 .IX Header "KEYS"
243 Note that keys are case sensitive.  For example use upper-case \fIP\fR
244 (shift P) to sort by \f(CW%CPU\fR.  \fI^\fR before a key means a Ctrl key, so
245 \&\fI^L\fR is Ctrl L.
246 .IP "\fIspace\fR or \fI^L\fR" 4
247 .IX Item "space or ^L"
248 Updates the display.
249 .IP "\fIq\fR" 4
250 .IX Item "q"
251 Quits the program.
252 .IP "\fIh\fR" 4
253 .IX Item "h"
254 Displays help.
255 .IP "\fIs\fR or \fId\fR" 4
256 .IX Item "s or d"
257 Change the delay between screen updates.
258 .IP "\fI0\fR (number 0)" 4
259 .IX Item "0 (number 0)"
260 Show the normal list of domains display.
261 .IP "\fI1\fR (number 1)" 4
262 .IX Item "1 (number 1)"
263 Toggle into showing physical CPUs.  If pressed
264 again toggles back to showing domains (the normal
265 display).
266 .IP "\fI2\fR" 4
267 .IX Item "2"
268 Toggle into showing network interfaces.  If pressed
269 again toggles back to showing domains.
270 .IP "\fI3\fR" 4
271 .IX Item "3"
272 Toggle into showing block devices (virtual disks).  If pressed again
273 toggles back to showing domains.
274 .IP "\fIP\fR" 4
275 .IX Item "P"
276 Sort by \f(CW%CPU\fR.
277 .IP "\fIM\fR" 4
278 .IX Item "M"
279 Sort by memory.
280 .IP "\fIT\fR" 4
281 .IX Item "T"
282 Sort by total time.
283 .IP "\fIN\fR" 4
284 .IX Item "N"
285 Sort by domain \s-1ID\s0.
286 .IP "\fIF\fR" 4
287 .IX Item "F"
288 Select the sort field interactively (there are other
289 sort fields you can choose using this key).
290 .IP "\fIW\fR" 4
291 .IX Item "W"
292 This creates or overwrites the init file with the current settings.
293 .Sp
294 This key is disabled if \fI\-\-no\-init\-file\fR was specified on the
295 command line or if \fIoverwrite-init-file false\fR is given in
296 the init file.
297 .SH "INIT FILE"
298 .IX Header "INIT FILE"
299 When virt-top starts up, it reads initial settings from the
300 file \fI.virt\-toprc\fR in the user's home directory.
301 .PP
302 The name of this file may be overridden using the \fI\-\-init\-file
303 filename\fR command line option or may be disabled entirely using
304 \&\fI\-\-no\-init\-file\fR.
305 .PP
306 The init file has a simple format.  Blank lines and comments
307 beginning with \fI#\fR are ignored.  Everything else is a set of
308 \&\fIkey value\fR pairs, described below.
309 .IP "\fBdisplay\fR \fItask|pcpu|block|net\fR" 4
310 .IX Item "display task|pcpu|block|net"
311 Sets the major display mode to one of \fItask\fR (tasks, the
312 default), \fIpcpu\fR (physical CPUs), \fIblock\fR (block devices),
313 or \fInet\fR (network interfaces).
314 .IP "\fBdelay\fR \fIsecs\fR" 4
315 .IX Item "delay secs"
316 Sets the delay between display updates in seconds.
317 .IP "\fBhist-cpu\fR \fIsecs\fR" 4
318 .IX Item "hist-cpu secs"
319 Sets the historical \s-1CPU\s0 delay in seconds.
320 .IP "\fBiterations\fR \fIn\fR" 4
321 .IX Item "iterations n"
322 Sets the number of iterations to run before we exit.  Setting
323 this to \fI\-1\fR means to run continuously.
324 .IP "\fBsort\fR \fIcpu|mem|time|id|name|...\fR" 4
325 .IX Item "sort cpu|mem|time|id|name|..."
326 Sets the sort order.  The option names are the same as for
327 the command line \fI\-o\fR option.
328 .IP "\fBconnect\fR \fIuri\fR" 4
329 .IX Item "connect uri"
330 Sets the default connection \s-1URI\s0.
331 .IP "\fBdebug\fR \fIfilename\fR" 4
332 .IX Item "debug filename"
333 Sets the default filename to use for debug and error messages.
334 .IP "\fBcsv\fR \fIfilename\fR" 4
335 .IX Item "csv filename"
336 Enables \s-1CSV\s0 output to the named file.
337 .IP "\fBbatch\fR \fItrue|false\fR" 4
338 .IX Item "batch true|false"
339 Sets batch mode.
340 .IP "\fBsecure\fR \fItrue|false\fR" 4
341 .IX Item "secure true|false"
342 Sets secure mode.
343 .IP "\fBscript\fR \fItrue|false\fR" 4
344 .IX Item "script true|false"
345 Sets script mode.
346 .IP "\fBoverwrite-init-file\fR \fIfalse\fR" 4
347 .IX Item "overwrite-init-file false"
348 If set to \fIfalse\fR then the \fIW\fR key will not overwrite the
349 init file.
350 .PP
351 Note that in the current implementation, options specified in
352 the init file override options specified on the command line.
353 This is a bug and this behaviour may change in the future.
354 .SH "SEE ALSO"
355 .IX Header "SEE ALSO"
356 \&\fItop\fR\|(1),
357 \&\fIvirsh\fR\|(1),
358 \&\fIxm\fR\|(1),
359 \&\fIxentop\fR\|(1),
360 <http://www.libvirt.org/>,
361 <http://et.redhat.com/~rjones/>,
362 <http://caml.inria.fr/>
363 .SH "AUTHORS"
364 .IX Header "AUTHORS"
365 Richard W.M. Jones <rjones @ redhat . com>
366 .SH "REPORTING BUGS"
367 .IX Header "REPORTING BUGS"
368 Bugs can be viewed on the Red Hat Bugzilla page:
369 <https://bugzilla.redhat.com/>.
370 .PP
371 If you find a bug in virt\-top, please follow these steps to report it:
372 .IP "1. Check for existing bug reports" 4
373 .IX Item "1. Check for existing bug reports"
374 Go to <https://bugzilla.redhat.com/> and search for similar bugs.
375 Someone may already have reported the same bug, and they may even
376 have fixed it.
377 .IP "2. Capture debug and error messages" 4
378 .IX Item "2. Capture debug and error messages"
379 Run
380 .Sp
381 .Vb 1
382 \& virt-top --debug virt-top.log
383 .Ve
384 .Sp
385 and keep \fIvirt\-top.log\fR.  It contains error messages which you
386 should submit with your bug report.
387 .IP "3. Get version of virt-top and version of libvirt." 4
388 .IX Item "3. Get version of virt-top and version of libvirt."
389 In virt\-top, press the \fIh\fR (help) key, and write down the version of
390 virt-top and the version of libvirt.  They are shown in the first
391 line.
392 .IP "4. Submit a bug report." 4
393 .IX Item "4. Submit a bug report."
394 Go to <https://bugzilla.redhat.com/> and enter a new bug.
395 Please describe the problem in as much detail as possible.
396 .Sp
397 Remember to include the version numbers (step 3) and the debug
398 messages file (step 2).
399 .IP "5. Assign the bug to rjones @ redhat.com" 4
400 .IX Item "5. Assign the bug to rjones @ redhat.com"
401 Assign or reassign the bug to \fBrjones @ redhat.com\fR (without the
402 spaces).  You can also send me an email with the bug number if you
403 want a faster response.