29610ed8efa7f06b12361aef2123023898351329
[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-11-20" "ocaml-libvirt-0.3.3.3" "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 .Sp
171 To connect to \s-1QEMU/KVM\s0 you would normally do \fI\-c qemu:///system\fR
172 .Sp
173 To connect to libvirtd on a remote machine you would normally do
174 \&\fI\-c xen://host/\fR
175 .Sp
176 Full details on connection URIs is available at
177 <http://libvirt.org/uri.html>
178 .IP "\fB\-d delay\fR" 4
179 .IX Item "-d delay"
180 Set the delay between screen updates in seconds.
181 The default is 3.0 seconds.  You can change this
182 while virt-top is running by pressing either \fIs\fR or \fId\fR key.
183 .IP "\fB\-n iterations\fR" 4
184 .IX Item "-n iterations"
185 Set the number of iterations to run.  The default
186 is to run continuously.
187 .IP "\fB\-o sort\fR" 4
188 .IX Item "-o sort"
189 Set the sort order to one of:
190 \&\fBcpu\fR (sort by \f(CW%CPU\fR used),
191 \&\fBmem\fR (sort by memory used),
192 \&\fBtime\fR (sort by total time),
193 \&\fBid\fR (sort by domain \s-1ID\s0),
194 \&\fBname\fR (sort by domain name),
195 \&\fBnetrx\fR (sort by network received bytes),
196 \&\fBnettx\fR (sort by network transmitted bytes),
197 \&\fBblockrdrq\fR (sort by block device [disk] read requests),
198 \&\fBblockwrrq\fR (sort by block device [disk] write requests).
199 .Sp
200 While virt-top is running you can change the sort
201 order using keys \fIP\fR (cpu), \fIM\fR (memory),
202 \&\fIT\fR (total time), \fIN\fR (domain \s-1ID\s0),
203 \&\fIF\fR (interactively select the sort field).
204 .IP "\fB\-s\fR" 4
205 .IX Item "-s"
206 Secure mode.  Currently this does nothing.
207 .IP "\fB\-\-hist\-cpu secs\fR" 4
208 .IX Item "--hist-cpu secs"
209 Set the time in seconds between updates of the historical
210 \&\f(CW%CPU\fR at the top right of the display.
211 .IP "\fB\-\-csv file.csv\fR" 4
212 .IX Item "--csv file.csv"
213 Write the statistics to file \fIfile.csv\fR.  First a header is written
214 showing the statistics being recorded in each column, then one line is
215 written for each screen update.  The \s-1CSV\s0 file can be loaded directly
216 by most spreadsheet programs.
217 .Sp
218 Currently the statistics which this records vary between releases of
219 virt-top (but the column headers will stay the same, so you can use
220 those to process the \s-1CSV\s0 file).
221 .Sp
222 Not every version of virt-top supports \s-1CSV\s0 output \- it depends how the
223 program was compiled (see \fI\s-1README\s0\fR file in the source distribution
224 for details).
225 .Sp
226 To save space you can compress your \s-1CSV\s0 files (if your shell supports
227 this feature, eg. \fIbash\fR):
228 .Sp
229 .Vb 1
230 \& virt-top --csv >(gzip -9 > output.csv.gz)
231 .Ve
232 .Sp
233 You can use a similar trick to split the \s-1CSV\s0 file up.  In this example
234 the \s-1CSV\s0 file is split every 1000 lines into files called
235 \&\fIoutput.csv.00\fR, \fIoutput.csv.01\fR etc.
236 .Sp
237 .Vb 1
238 \& virt-top --csv >(split -d -l 1000 - output.csv.)
239 .Ve
240 .IP "\fB\-\-no\-csv\-cpu\fR" 4
241 .IX Item "--no-csv-cpu"
242 Disable domain \s-1CPU\s0 stats in \s-1CSV\s0 output.
243 .IP "\fB\-\-no\-csv\-block\fR" 4
244 .IX Item "--no-csv-block"
245 Disable domain block device stats in \s-1CSV\s0 output.
246 .IP "\fB\-\-no\-csv\-net\fR" 4
247 .IX Item "--no-csv-net"
248 Disable domain network interface stats in \s-1CSV\s0 output.
249 .IP "\fB\-\-debug filename\fR" 4
250 .IX Item "--debug filename"
251 Send debug and error messages to \fIfilename\fR.
252 To send error messages to syslog you can do:
253 .Sp
254 .Vb 1
255 \& virt-top --debug >(logger -t virt-top)
256 .Ve
257 .Sp
258 See also \s-1REPORTING\s0 \s-1BUGS\s0 below.
259 .IP "\fB\-\-init\-file filename\fR" 4
260 .IX Item "--init-file filename"
261 Read \fIfilename\fR as the init file instead of the default which is
262 \&\fI$HOME/.virt\-toprc\fR.  See also \s-1INIT\s0 \s-1FILE\s0 below.
263 .IP "\fB\-\-no\-init\-file\fR" 4
264 .IX Item "--no-init-file"
265 Do not read any init file.
266 .IP "\fB\-\-script\fR" 4
267 .IX Item "--script"
268 Script mode.  There will be no user interface.  This is most useful
269 when used together with the \fI\-\-csv\fR and \fI\-n\fR options.
270 .IP "\fB\-\-end\-time time\fR" 4
271 .IX Item "--end-time time"
272 The program will exit at the \fItime\fR given.
273 .Sp
274 The time may be given in one of the following formats:
275 .RS 4
276 .IP "\fIYYYY-MM-DD \s-1HH:MM:SS\s0\fR" 4
277 .IX Item "YYYY-MM-DD HH:MM:SS"
278 End time is the date and time given.
279 .IP "\fI\s-1HH:MM:SS\s0\fR" 4
280 .IX Item "HH:MM:SS"
281 End time is the time given, today.
282 .IP "\fI+HH:MM:SS\fR" 4
283 .IX Item "+HH:MM:SS"
284 End time is \s-1HH\s0 hours, \s-1MM\s0 minutes, \s-1SS\s0 seconds in the future (counted
285 from the moment that program starts).
286 .IP "\fI+secs\fR" 4
287 .IX Item "+secs"
288 End time is \fIsecs\fR seconds in the future.
289 .RE
290 .RS 4
291 .Sp
292 For example to run the program for 3 minutes you could do:
293 .Sp
294 .Vb 1
295 \& virt-top --end-time +00:03:00
296 .Ve
297 .Sp
298 or:
299 .Sp
300 .Vb 1
301 \& virt-top --end-time +180
302 .Ve
303 .Sp
304 Not every version of virt-top supports this option \- it depends how the
305 program was compiled (see \fI\s-1README\s0\fR file in the source distribution
306 for details).
307 .RE
308 .IP "\fB\-\-help\fR" 4
309 .IX Item "--help"
310 Display usage summary.
311 .SH "KEYS"
312 .IX Header "KEYS"
313 Note that keys are case sensitive.  For example use upper-case \fIP\fR
314 (shift P) to sort by \f(CW%CPU\fR.  \fI^\fR before a key means a Ctrl key, so
315 \&\fI^L\fR is Ctrl L.
316 .IP "\fIspace\fR or \fI^L\fR" 4
317 .IX Item "space or ^L"
318 Updates the display.
319 .IP "\fIq\fR" 4
320 .IX Item "q"
321 Quits the program.
322 .IP "\fIh\fR" 4
323 .IX Item "h"
324 Displays help.
325 .IP "\fIs\fR or \fId\fR" 4
326 .IX Item "s or d"
327 Change the delay between screen updates.
328 .IP "\fI0\fR (number 0)" 4
329 .IX Item "0 (number 0)"
330 Show the normal list of domains display.
331 .IP "\fI1\fR (number 1)" 4
332 .IX Item "1 (number 1)"
333 Toggle into showing physical CPUs.  If pressed
334 again toggles back to showing domains (the normal
335 display).
336 .IP "\fI2\fR" 4
337 .IX Item "2"
338 Toggle into showing network interfaces.  If pressed
339 again toggles back to showing domains.
340 .IP "\fI3\fR" 4
341 .IX Item "3"
342 Toggle into showing block devices (virtual disks).  If pressed again
343 toggles back to showing domains.
344 .IP "\fIP\fR" 4
345 .IX Item "P"
346 Sort by \f(CW%CPU\fR.
347 .IP "\fIM\fR" 4
348 .IX Item "M"
349 Sort by memory.
350 .IP "\fIT\fR" 4
351 .IX Item "T"
352 Sort by total time.
353 .IP "\fIN\fR" 4
354 .IX Item "N"
355 Sort by domain \s-1ID\s0.
356 .IP "\fIF\fR" 4
357 .IX Item "F"
358 Select the sort field interactively (there are other
359 sort fields you can choose using this key).
360 .IP "\fIW\fR" 4
361 .IX Item "W"
362 This creates or overwrites the init file with the current settings.
363 .Sp
364 This key is disabled if \fI\-\-no\-init\-file\fR was specified on the
365 command line or if \fIoverwrite-init-file false\fR is given in
366 the init file.
367 .SH "INIT FILE"
368 .IX Header "INIT FILE"
369 When virt-top starts up, it reads initial settings from the
370 file \fI.virt\-toprc\fR in the user's home directory.
371 .PP
372 The name of this file may be overridden using the \fI\-\-init\-file
373 filename\fR command line option or may be disabled entirely using
374 \&\fI\-\-no\-init\-file\fR.
375 .PP
376 The init file has a simple format.  Blank lines and comments
377 beginning with \fI#\fR are ignored.  Everything else is a set of
378 \&\fIkey value\fR pairs, described below.
379 .IP "\fBdisplay\fR \fItask|pcpu|block|net\fR" 4
380 .IX Item "display task|pcpu|block|net"
381 Sets the major display mode to one of \fItask\fR (tasks, the
382 default), \fIpcpu\fR (physical CPUs), \fIblock\fR (block devices),
383 or \fInet\fR (network interfaces).
384 .IP "\fBdelay\fR \fIsecs\fR" 4
385 .IX Item "delay secs"
386 Sets the delay between display updates in seconds.
387 .IP "\fBhist-cpu\fR \fIsecs\fR" 4
388 .IX Item "hist-cpu secs"
389 Sets the historical \s-1CPU\s0 delay in seconds.
390 .IP "\fBiterations\fR \fIn\fR" 4
391 .IX Item "iterations n"
392 Sets the number of iterations to run before we exit.  Setting
393 this to \fI\-1\fR means to run continuously.
394 .IP "\fBsort\fR \fIcpu|mem|time|id|name|...\fR" 4
395 .IX Item "sort cpu|mem|time|id|name|..."
396 Sets the sort order.  The option names are the same as for
397 the command line \fI\-o\fR option.
398 .IP "\fBconnect\fR \fIuri\fR" 4
399 .IX Item "connect uri"
400 Sets the default connection \s-1URI\s0.
401 .IP "\fBdebug\fR \fIfilename\fR" 4
402 .IX Item "debug filename"
403 Sets the default filename to use for debug and error messages.
404 .IP "\fBcsv\fR \fIfilename\fR" 4
405 .IX Item "csv filename"
406 Enables \s-1CSV\s0 output to the named file.
407 .IP "\fBcsv-cpu\fR \fItrue|false\fR" 4
408 .IX Item "csv-cpu true|false"
409 Enable or disable domain \s-1CPU\s0 stats in \s-1CSV\s0 output.
410 .IP "\fBcsv-block\fR \fItrue|false\fR" 4
411 .IX Item "csv-block true|false"
412 Enable or disable domain block device stats in \s-1CSV\s0 output.
413 .IP "\fBcsv-net\fR \fItrue|false\fR" 4
414 .IX Item "csv-net true|false"
415 Enable or disable domain network interface stats in \s-1CSV\s0 output.
416 .IP "\fBbatch\fR \fItrue|false\fR" 4
417 .IX Item "batch true|false"
418 Sets batch mode.
419 .IP "\fBsecure\fR \fItrue|false\fR" 4
420 .IX Item "secure true|false"
421 Sets secure mode.
422 .IP "\fBscript\fR \fItrue|false\fR" 4
423 .IX Item "script true|false"
424 Sets script mode.
425 .IP "\fBend-time\fR \fItime\fR" 4
426 .IX Item "end-time time"
427 Set the time at which the program exits.  See above for the
428 time formats supported.
429 .IP "\fBoverwrite-init-file\fR \fIfalse\fR" 4
430 .IX Item "overwrite-init-file false"
431 If set to \fIfalse\fR then the \fIW\fR key will not overwrite the
432 init file.
433 .PP
434 Note that in the current implementation, options specified in
435 the init file override options specified on the command line.
436 This is a bug and this behaviour may change in the future.
437 .SH "SEE ALSO"
438 .IX Header "SEE ALSO"
439 \&\fItop\fR\|(1),
440 \&\fIvirsh\fR\|(1),
441 \&\fIxm\fR\|(1),
442 \&\fIxentop\fR\|(1),
443 <http://www.libvirt.org/ocaml/>,
444 <http://www.libvirt.org/>,
445 <http://et.redhat.com/~rjones/>,
446 <http://caml.inria.fr/>
447 .SH "AUTHORS"
448 .IX Header "AUTHORS"
449 Richard W.M. Jones <rjones @ redhat . com>
450 .SH "COPYRIGHT"
451 .IX Header "COPYRIGHT"
452 (C) Copyright 2007 Red Hat Inc., Richard W.M. Jones
453 http://libvirt.org/
454 .PP
455 This program is free software; you can redistribute it and/or modify
456 it under the terms of the \s-1GNU\s0 General Public License as published by
457 the Free Software Foundation; either version 2 of the License, or
458 (at your option) any later version.
459 .PP
460 This program is distributed in the hope that it will be useful,
461 but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
462 \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.  See the
463 \&\s-1GNU\s0 General Public License for more details.
464 .PP
465 You should have received a copy of the \s-1GNU\s0 General Public License
466 along with this program; if not, write to the Free Software
467 Foundation, Inc., 675 Mass Ave, Cambridge, \s-1MA\s0 02139, \s-1USA\s0.
468 .SH "REPORTING BUGS"
469 .IX Header "REPORTING BUGS"
470 Bugs can be viewed on the Red Hat Bugzilla page:
471 <https://bugzilla.redhat.com/>.
472 .PP
473 If you find a bug in virt\-top, please follow these steps to report it:
474 .IP "1. Check for existing bug reports" 4
475 .IX Item "1. Check for existing bug reports"
476 Go to <https://bugzilla.redhat.com/> and search for similar bugs.
477 Someone may already have reported the same bug, and they may even
478 have fixed it.
479 .IP "2. Capture debug and error messages" 4
480 .IX Item "2. Capture debug and error messages"
481 Run
482 .Sp
483 .Vb 1
484 \& virt-top --debug virt-top.log
485 .Ve
486 .Sp
487 and keep \fIvirt\-top.log\fR.  It contains error messages which you
488 should submit with your bug report.
489 .IP "3. Get version of virt-top and version of libvirt." 4
490 .IX Item "3. Get version of virt-top and version of libvirt."
491 In virt\-top, press the \fIh\fR (help) key, and write down the version of
492 virt-top and the version of libvirt.  They are shown in the first
493 line.
494 .IP "4. Submit a bug report." 4
495 .IX Item "4. Submit a bug report."
496 Go to <https://bugzilla.redhat.com/> and enter a new bug.
497 Please describe the problem in as much detail as possible.
498 .Sp
499 Remember to include the version numbers (step 3) and the debug
500 messages file (step 2).
501 .IP "5. Assign the bug to rjones @ redhat.com" 4
502 .IX Item "5. Assign the bug to rjones @ redhat.com"
503 Assign or reassign the bug to \fBrjones @ redhat.com\fR (without the
504 spaces).  You can also send me an email with the bug number if you
505 want a faster response.