Remove -w s and fix so it compiles without warnings.
[virt-top.git] / virt-top / virt-top.1
1 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
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.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
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 .\" Escape single quotes in literal strings from groff's Unicode transform.
52 .ie \n(.g .ds Aq \(aq
53 .el       .ds Aq '
54 .\"
55 .\" If the F register is turned on, we'll generate index entries on stderr for
56 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
57 .\" entries marked with X<> in POD.  Of course, you'll have to process the
58 .\" output yourself in some meaningful fashion.
59 .ie \nF \{\
60 .    de IX
61 .    tm Index:\\$1\t\\n%\t"\\$2"
62 ..
63 .    nr % 0
64 .    rr F
65 .\}
66 .el \{\
67 .    de IX
68 ..
69 .\}
70 .\"
71 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
72 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
73 .    \" fudge factors for nroff and troff
74 .if n \{\
75 .    ds #H 0
76 .    ds #V .8m
77 .    ds #F .3m
78 .    ds #[ \f1
79 .    ds #] \fP
80 .\}
81 .if t \{\
82 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
83 .    ds #V .6m
84 .    ds #F 0
85 .    ds #[ \&
86 .    ds #] \&
87 .\}
88 .    \" simple accents for nroff and troff
89 .if n \{\
90 .    ds ' \&
91 .    ds ` \&
92 .    ds ^ \&
93 .    ds , \&
94 .    ds ~ ~
95 .    ds /
96 .\}
97 .if t \{\
98 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
99 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
100 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
101 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
102 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
103 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
104 .\}
105 .    \" troff and (daisy-wheel) nroff accents
106 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
107 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
108 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
109 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
110 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
111 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
112 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
113 .ds ae a\h'-(\w'a'u*4/10)'e
114 .ds Ae A\h'-(\w'A'u*4/10)'E
115 .    \" corrections for vroff
116 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
117 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
118 .    \" for low resolution devices (crt and lpr)
119 .if \n(.H>23 .if \n(.V>19 \
120 \{\
121 .    ds : e
122 .    ds 8 ss
123 .    ds o a
124 .    ds d- d\h'-1'\(ga
125 .    ds D- D\h'-1'\(hy
126 .    ds th \o'bp'
127 .    ds Th \o'LP'
128 .    ds ae ae
129 .    ds Ae AE
130 .\}
131 .rm #[ #] #H #V #F C
132 .\" ========================================================================
133 .\"
134 .IX Title "VIRT-TOP 1"
135 .TH VIRT-TOP 1 "2009-10-05" "virt-top-1.0.4" "Virtualization Support"
136 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
137 .\" way too many mistakes in technical documents.
138 .if n .ad l
139 .nh
140 .SH "NAME"
141 virt\-top \- 'top'\-like utility for virtualization stats
142 .SH "SUMMARY"
143 .IX Header "SUMMARY"
144 virt-top [\-options]
145 .SH "DESCRIPTION"
146 .IX Header "DESCRIPTION"
147 virt-top is a \fItop\fR\|(1)\-like utility for showing stats of virtualized
148 domains.  Many keys and command line options are the same as for
149 ordinary \fItop\fR.
150 .PP
151 It uses libvirt so it is capable of showing stats across a variety of
152 different virtualization systems.
153 .SH "OPTIONS"
154 .IX Header "OPTIONS"
155 .IP "\fB\-1\fR" 4
156 .IX Item "-1"
157 Display physical CPUs by default (instead of domains).
158 When virt-top is running, use the \fI1\fR key to toggle
159 between physical CPUs and domains display.
160 .IP "\fB\-2\fR" 4
161 .IX Item "-2"
162 Display network interfaces by default (instead of domains).
163 When virt-top is running, use the \fI2\fR key to toggle
164 between network interfaces and domains display.
165 .IP "\fB\-3\fR" 4
166 .IX Item "-3"
167 Display block devices (virtual disks) by default (instead of domains).
168 When virt-top is running, use the \fI3\fR key to toggle
169 between block devices and domains display.
170 .IP "\fB\-b\fR" 4
171 .IX Item "-b"
172 Batch mode.  In this mode keypresses are ignored.
173 .IP "\fB\-c uri\fR or \fB\-\-connect uri\fR" 4
174 .IX Item "-c uri or --connect uri"
175 Connect to \s-1URI\s0 given.  The default is to connect to the Xen
176 hypervisor.
177 .Sp
178 To connect to \s-1QEMU/KVM\s0 you would normally do \fI\-c qemu:///system\fR
179 .Sp
180 To connect to libvirtd on a remote machine you would normally do
181 \&\fI\-c xen://host/\fR
182 .Sp
183 Full details on connection URIs is available at
184 <http://libvirt.org/uri.html>
185 .IP "\fB\-d delay\fR" 4
186 .IX Item "-d delay"
187 Set the delay between screen updates in seconds.
188 The default is 3.0 seconds.  You can change this
189 while virt-top is running by pressing either \fIs\fR or \fId\fR key.
190 .IP "\fB\-n iterations\fR" 4
191 .IX Item "-n iterations"
192 Set the number of iterations to run.  The default
193 is to run continuously.
194 .IP "\fB\-o sort\fR" 4
195 .IX Item "-o sort"
196 Set the sort order to one of:
197 \&\fBcpu\fR (sort by \f(CW%CPU\fR used),
198 \&\fBmem\fR (sort by memory used),
199 \&\fBtime\fR (sort by total time),
200 \&\fBid\fR (sort by domain \s-1ID\s0),
201 \&\fBname\fR (sort by domain name),
202 \&\fBnetrx\fR (sort by network received bytes),
203 \&\fBnettx\fR (sort by network transmitted bytes),
204 \&\fBblockrdrq\fR (sort by block device [disk] read requests),
205 \&\fBblockwrrq\fR (sort by block device [disk] write requests).
206 .Sp
207 While virt-top is running you can change the sort
208 order using keys \fIP\fR (cpu), \fIM\fR (memory),
209 \&\fIT\fR (total time), \fIN\fR (domain \s-1ID\s0),
210 \&\fIF\fR (interactively select the sort field).
211 .IP "\fB\-s\fR" 4
212 .IX Item "-s"
213 Secure mode.  Currently this does nothing.
214 .IP "\fB\-\-hist\-cpu secs\fR" 4
215 .IX Item "--hist-cpu secs"
216 Set the time in seconds between updates of the historical
217 \&\f(CW%CPU\fR at the top right of the display.
218 .IP "\fB\-\-csv file.csv\fR" 4
219 .IX Item "--csv file.csv"
220 Write the statistics to file \fIfile.csv\fR.  First a header is written
221 showing the statistics being recorded in each column, then one line is
222 written for each screen update.  The \s-1CSV\s0 file can be loaded directly
223 by most spreadsheet programs.
224 .Sp
225 Currently the statistics which this records vary between releases of
226 virt-top (but the column headers will stay the same, so you can use
227 those to process the \s-1CSV\s0 file).
228 .Sp
229 Not every version of virt-top supports \s-1CSV\s0 output \- it depends how the
230 program was compiled (see \fI\s-1README\s0\fR file in the source distribution
231 for details).
232 .Sp
233 To save space you can compress your \s-1CSV\s0 files (if your shell supports
234 this feature, eg. \fIbash\fR):
235 .Sp
236 .Vb 1
237 \& virt\-top \-\-csv >(gzip \-9 > output.csv.gz)
238 .Ve
239 .Sp
240 You can use a similar trick to split the \s-1CSV\s0 file up.  In this example
241 the \s-1CSV\s0 file is split every 1000 lines into files called
242 \&\fIoutput.csv.00\fR, \fIoutput.csv.01\fR etc.
243 .Sp
244 .Vb 1
245 \& virt\-top \-\-csv >(split \-d \-l 1000 \- output.csv.)
246 .Ve
247 .IP "\fB\-\-no\-csv\-cpu\fR" 4
248 .IX Item "--no-csv-cpu"
249 Disable domain \s-1CPU\s0 stats in \s-1CSV\s0 output.
250 .IP "\fB\-\-no\-csv\-block\fR" 4
251 .IX Item "--no-csv-block"
252 Disable domain block device stats in \s-1CSV\s0 output.
253 .IP "\fB\-\-no\-csv\-net\fR" 4
254 .IX Item "--no-csv-net"
255 Disable domain network interface stats in \s-1CSV\s0 output.
256 .IP "\fB\-\-debug filename\fR" 4
257 .IX Item "--debug filename"
258 Send debug and error messages to \fIfilename\fR.
259 To send error messages to syslog you can do:
260 .Sp
261 .Vb 1
262 \& virt\-top \-\-debug >(logger \-t virt\-top)
263 .Ve
264 .Sp
265 See also \s-1REPORTING\s0 \s-1BUGS\s0 below.
266 .IP "\fB\-\-init\-file filename\fR" 4
267 .IX Item "--init-file filename"
268 Read \fIfilename\fR as the init file instead of the default which is
269 \&\fI\f(CI$HOME\fI/.virt\-toprc\fR.  See also \s-1INIT\s0 \s-1FILE\s0 below.
270 .IP "\fB\-\-no\-init\-file\fR" 4
271 .IX Item "--no-init-file"
272 Do not read any init file.
273 .IP "\fB\-\-script\fR" 4
274 .IX Item "--script"
275 Script mode.  There will be no user interface.  This is most useful
276 when used together with the \fI\-\-csv\fR and \fI\-n\fR options.
277 .IP "\fB\-\-end\-time time\fR" 4
278 .IX Item "--end-time time"
279 The program will exit at the \fItime\fR given.
280 .Sp
281 The time may be given in one of the following formats:
282 .RS 4
283 .IP "\fIYYYY-MM-DD \s-1HH:MM:SS\s0\fR" 4
284 .IX Item "YYYY-MM-DD HH:MM:SS"
285 End time is the date and time given.
286 .IP "\fI\s-1HH:MM:SS\s0\fR" 4
287 .IX Item "HH:MM:SS"
288 End time is the time given, today.
289 .IP "\fI+HH:MM:SS\fR" 4
290 .IX Item "+HH:MM:SS"
291 End time is \s-1HH\s0 hours, \s-1MM\s0 minutes, \s-1SS\s0 seconds in the future (counted
292 from the moment that program starts).
293 .IP "\fI+secs\fR" 4
294 .IX Item "+secs"
295 End time is \fIsecs\fR seconds in the future.
296 .RE
297 .RS 4
298 .Sp
299 For example to run the program for 3 minutes you could do:
300 .Sp
301 .Vb 1
302 \& virt\-top \-\-end\-time +00:03:00
303 .Ve
304 .Sp
305 or:
306 .Sp
307 .Vb 1
308 \& virt\-top \-\-end\-time +180
309 .Ve
310 .Sp
311 Not every version of virt-top supports this option \- it depends how the
312 program was compiled (see \fI\s-1README\s0\fR file in the source distribution
313 for details).
314 .RE
315 .IP "\fB\-\-help\fR" 4
316 .IX Item "--help"
317 Display usage summary.
318 .IP "\fB\-\-version\fR" 4
319 .IX Item "--version"
320 Display version number and exit.
321 .SH "KEYS"
322 .IX Header "KEYS"
323 Note that keys are case sensitive.  For example use upper-case \fIP\fR
324 (shift P) to sort by \f(CW%CPU\fR.  \fI^\fR before a key means a Ctrl key, so
325 \&\fI^L\fR is Ctrl L.
326 .IP "\fIspace\fR or \fI^L\fR" 4
327 .IX Item "space or ^L"
328 Updates the display.
329 .IP "\fIq\fR" 4
330 .IX Item "q"
331 Quits the program.
332 .IP "\fIh\fR" 4
333 .IX Item "h"
334 Displays help.
335 .IP "\fIs\fR or \fId\fR" 4
336 .IX Item "s or d"
337 Change the delay between screen updates.
338 .IP "\fI0\fR (number 0)" 4
339 .IX Item "0 (number 0)"
340 Show the normal list of domains display.
341 .IP "\fI1\fR (number 1)" 4
342 .IX Item "1 (number 1)"
343 Toggle into showing physical CPUs.  If pressed
344 again toggles back to showing domains (the normal
345 display).
346 .IP "\fI2\fR" 4
347 .IX Item "2"
348 Toggle into showing network interfaces.  If pressed
349 again toggles back to showing domains.
350 .IP "\fI3\fR" 4
351 .IX Item "3"
352 Toggle into showing block devices (virtual disks).  If pressed again
353 toggles back to showing domains.
354 .IP "\fIP\fR" 4
355 .IX Item "P"
356 Sort by \f(CW%CPU\fR.
357 .IP "\fIM\fR" 4
358 .IX Item "M"
359 Sort by memory.
360 .IP "\fIT\fR" 4
361 .IX Item "T"
362 Sort by total time.
363 .IP "\fIN\fR" 4
364 .IX Item "N"
365 Sort by domain \s-1ID\s0.
366 .IP "\fIF\fR" 4
367 .IX Item "F"
368 Select the sort field interactively (there are other
369 sort fields you can choose using this key).
370 .IP "\fIW\fR" 4
371 .IX Item "W"
372 This creates or overwrites the init file with the current settings.
373 .Sp
374 This key is disabled if \fI\-\-no\-init\-file\fR was specified on the
375 command line or if \fIoverwrite-init-file false\fR is given in
376 the init file.
377 .SH "INIT FILE"
378 .IX Header "INIT FILE"
379 When virt-top starts up, it reads initial settings from the
380 file \fI.virt\-toprc\fR in the user's home directory.
381 .PP
382 The name of this file may be overridden using the \fI\-\-init\-file
383 filename\fR command line option or may be disabled entirely using
384 \&\fI\-\-no\-init\-file\fR.
385 .PP
386 The init file has a simple format.  Blank lines and comments
387 beginning with \fI#\fR are ignored.  Everything else is a set of
388 \&\fIkey value\fR pairs, described below.
389 .IP "\fBdisplay\fR \fItask|pcpu|block|net\fR" 4
390 .IX Item "display task|pcpu|block|net"
391 Sets the major display mode to one of \fItask\fR (tasks, the
392 default), \fIpcpu\fR (physical CPUs), \fIblock\fR (block devices),
393 or \fInet\fR (network interfaces).
394 .IP "\fBdelay\fR \fIsecs\fR" 4
395 .IX Item "delay secs"
396 Sets the delay between display updates in seconds.
397 .IP "\fBhist-cpu\fR \fIsecs\fR" 4
398 .IX Item "hist-cpu secs"
399 Sets the historical \s-1CPU\s0 delay in seconds.
400 .IP "\fBiterations\fR \fIn\fR" 4
401 .IX Item "iterations n"
402 Sets the number of iterations to run before we exit.  Setting
403 this to \fI\-1\fR means to run continuously.
404 .IP "\fBsort\fR \fIcpu|mem|time|id|name|...\fR" 4
405 .IX Item "sort cpu|mem|time|id|name|..."
406 Sets the sort order.  The option names are the same as for
407 the command line \fI\-o\fR option.
408 .IP "\fBconnect\fR \fIuri\fR" 4
409 .IX Item "connect uri"
410 Sets the default connection \s-1URI\s0.
411 .IP "\fBdebug\fR \fIfilename\fR" 4
412 .IX Item "debug filename"
413 Sets the default filename to use for debug and error messages.
414 .IP "\fBcsv\fR \fIfilename\fR" 4
415 .IX Item "csv filename"
416 Enables \s-1CSV\s0 output to the named file.
417 .IP "\fBcsv-cpu\fR \fItrue|false\fR" 4
418 .IX Item "csv-cpu true|false"
419 Enable or disable domain \s-1CPU\s0 stats in \s-1CSV\s0 output.
420 .IP "\fBcsv-block\fR \fItrue|false\fR" 4
421 .IX Item "csv-block true|false"
422 Enable or disable domain block device stats in \s-1CSV\s0 output.
423 .IP "\fBcsv-net\fR \fItrue|false\fR" 4
424 .IX Item "csv-net true|false"
425 Enable or disable domain network interface stats in \s-1CSV\s0 output.
426 .IP "\fBbatch\fR \fItrue|false\fR" 4
427 .IX Item "batch true|false"
428 Sets batch mode.
429 .IP "\fBsecure\fR \fItrue|false\fR" 4
430 .IX Item "secure true|false"
431 Sets secure mode.
432 .IP "\fBscript\fR \fItrue|false\fR" 4
433 .IX Item "script true|false"
434 Sets script mode.
435 .IP "\fBend-time\fR \fItime\fR" 4
436 .IX Item "end-time time"
437 Set the time at which the program exits.  See above for the
438 time formats supported.
439 .IP "\fBoverwrite-init-file\fR \fIfalse\fR" 4
440 .IX Item "overwrite-init-file false"
441 If set to \fIfalse\fR then the \fIW\fR key will not overwrite the
442 init file.
443 .PP
444 Note that in the current implementation, options specified in
445 the init file override options specified on the command line.
446 This is a bug and this behaviour may change in the future.
447 .SH "SEE ALSO"
448 .IX Header "SEE ALSO"
449 \&\fItop\fR\|(1),
450 \&\fIvirsh\fR\|(1),
451 \&\fIxm\fR\|(1),
452 \&\fIxentop\fR\|(1),
453 <http://www.libvirt.org/ocaml/>,
454 <http://www.libvirt.org/>,
455 <http://et.redhat.com/~rjones/>,
456 <http://caml.inria.fr/>
457 .SH "AUTHORS"
458 .IX Header "AUTHORS"
459 Richard W.M. Jones <rjones @ redhat . com>
460 .SH "COPYRIGHT"
461 .IX Header "COPYRIGHT"
462 (C) Copyright 2007 Red Hat Inc., Richard W.M. Jones
463 http://libvirt.org/
464 .PP
465 This program is free software; you can redistribute it and/or modify
466 it under the terms of the \s-1GNU\s0 General Public License as published by
467 the Free Software Foundation; either version 2 of the License, or
468 (at your option) any later version.
469 .PP
470 This program is distributed in the hope that it will be useful,
471 but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
472 \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.  See the
473 \&\s-1GNU\s0 General Public License for more details.
474 .PP
475 You should have received a copy of the \s-1GNU\s0 General Public License
476 along with this program; if not, write to the Free Software
477 Foundation, Inc., 675 Mass Ave, Cambridge, \s-1MA\s0 02139, \s-1USA\s0.
478 .SH "REPORTING BUGS"
479 .IX Header "REPORTING BUGS"
480 Bugs can be viewed on the Red Hat Bugzilla page:
481 <https://bugzilla.redhat.com/>.
482 .PP
483 If you find a bug in virt-top, please follow these steps to report it:
484 .IP "1. Check for existing bug reports" 4
485 .IX Item "1. Check for existing bug reports"
486 Go to <https://bugzilla.redhat.com/> and search for similar bugs.
487 Someone may already have reported the same bug, and they may even
488 have fixed it.
489 .IP "2. Capture debug and error messages" 4
490 .IX Item "2. Capture debug and error messages"
491 Run
492 .Sp
493 .Vb 1
494 \& virt\-top \-\-debug virt\-top.log
495 .Ve
496 .Sp
497 and keep \fIvirt\-top.log\fR.  It contains error messages which you
498 should submit with your bug report.
499 .IP "3. Get version of virt-top and version of libvirt." 4
500 .IX Item "3. Get version of virt-top and version of libvirt."
501 Use:
502 .Sp
503 .Vb 1
504 \& virt\-top \-\-version
505 .Ve
506 .Sp
507 If you can get the precise version of libvirt you are using
508 then that too is helpful.
509 .IP "4. Submit a bug report." 4
510 .IX Item "4. Submit a bug report."
511 Go to <https://bugzilla.redhat.com/> and enter a new bug.
512 Please describe the problem in as much detail as possible.
513 .Sp
514 Remember to include the version numbers (step 3) and the debug
515 messages file (step 2).
516 .IP "5. Assign the bug to rjones @ redhat.com" 4
517 .IX Item "5. Assign the bug to rjones @ redhat.com"
518 Assign or reassign the bug to \fBrjones @ redhat.com\fR (without the
519 spaces).  You can also send me an email with the bug number if you
520 want a faster response.