Removed $Id$ everywhere.
[virt-top.git] / virt-top / virt-top.pod
1 =head1 NAME
2
3 virt-top - 'top'-like utility for virtualization stats
4
5 =head1 SUMMARY
6
7 virt-top [-options]
8
9 =head1 DESCRIPTION
10
11 virt-top is a L<top(1)>-like utility for showing stats of virtualized
12 domains.  Many keys and command line options are the same as for
13 ordinary I<top>.
14
15 It uses libvirt so it is capable of showing stats across a variety of
16 different virtualization systems.
17
18 =head1 OPTIONS
19
20 =over 4
21
22 =item B<-1>
23
24 Display physical CPUs by default (instead of domains).
25 When virt-top is running, use the I<1> key to toggle
26 between physical CPUs and domains display.
27
28 =item B<-2>
29
30 Display network interfaces by default (instead of domains).
31 When virt-top is running, use the I<2> key to toggle
32 between network interfaces and domains display.
33
34 =item B<-3>
35
36 Display block devices (virtual disks) by default (instead of domains).
37 When virt-top is running, use the I<3> key to toggle
38 between block devices and domains display.
39
40 =item B<-b>
41
42 Batch mode.  In this mode keypresses are ignored.
43
44 =item B<-c uri> or B<--connect uri>
45
46 Connect to URI given.  The default is to connect to the Xen
47 hypervisor.
48
49 =item B<-d delay>
50
51 Set the delay between screen updates in seconds.
52 The default is 3.0 seconds.  You can change this
53 while virt-top is running by pressing either I<s> or I<d> key.
54
55 =item B<-n iterations>
56
57 Set the number of iterations to run.  The default
58 is to run continuously.
59
60 =item B<-o sort>
61
62 Set the sort order to one of:
63 B<cpu> (sort by %CPU used),
64 B<mem> (sort by memory used),
65 B<time> (sort by total time),
66 B<id> (sort by domain ID),
67 B<name> (sort by domain name),
68 B<netrx> (sort by network received bytes),
69 B<nettx> (sort by network transmitted bytes),
70 B<blockrdrq> (sort by block device [disk] read requests),
71 B<blockwrrq> (sort by block device [disk] write requests).
72
73 While virt-top is running you can change the sort
74 order using keys I<P> (cpu), I<M> (memory),
75 I<T> (total time), I<N> (domain ID),
76 I<F> (interactively select the sort field).
77
78 =item B<-s>
79
80 Secure mode.  Currently this does nothing.
81
82 =item B<--hist-cpu secs>
83
84 Set the time in seconds between updates of the historical
85 %CPU at the top right of the display.
86
87 =item B<--csv file.csv>
88
89 Write the statistics to file I<file.csv>.  First a header is written
90 showing the statistics being recorded in each column, then one line is
91 written for each screen update.  The CSV file can be loaded directly
92 by most spreadsheet programs.
93
94 Currently the statistics which this records vary between releases of
95 virt-top (but the column headers will stay the same, so you can use
96 those to process the CSV file).
97
98 Not every version of virt-top supports CSV output - it depends how the
99 program was compiled (see I<README> file in the source distribution
100 for details).
101
102 =item B<--no-csv-cpu>
103
104 Disable domain CPU stats in CSV output.
105
106 =item B<--no-csv-block>
107
108 Disable domain block device stats in CSV output.
109
110 =item B<--no-csv-net>
111
112 Disable domain network interface stats in CSV output.
113
114 =item B<--debug filename>
115
116 Send debug and error messages to I<filename>.
117 To send error messages to syslog you can do:
118
119  virt-top --debug >(logger -t virt-top)
120
121 See also REPORTING BUGS below.
122
123 =item B<--init-file filename>
124
125 Read I<filename> as the init file instead of the default which is
126 I<$HOME/.virt-toprc>.  See also INIT FILE below.
127
128 =item B<--no-init-file>
129
130 Do not read any init file.
131
132 =item B<--script>
133
134 Script mode.  There will be no user interface.  This is most useful
135 when used together with the I<--csv> and I<-n> options.
136
137 =item B<--help>
138
139 Display usage summary.
140
141 =back
142
143 =head1 KEYS
144
145 Note that keys are case sensitive.  For example use upper-case I<P>
146 (shift P) to sort by %CPU.  I<^> before a key means a Ctrl key, so
147 I<^L> is Ctrl L.
148
149 =over 4
150
151 =item I<space> or I<^L>
152
153 Updates the display.
154
155 =item I<q>
156
157 Quits the program.
158
159 =item I<h>
160
161 Displays help.
162
163 =item I<s> or I<d>
164
165 Change the delay between screen updates.
166
167 =item I<0> (number 0)
168
169 Show the normal list of domains display.
170
171 =item I<1> (number 1)
172
173 Toggle into showing physical CPUs.  If pressed
174 again toggles back to showing domains (the normal
175 display).
176
177 =item I<2>
178
179 Toggle into showing network interfaces.  If pressed
180 again toggles back to showing domains.
181
182 =item I<3>
183
184 Toggle into showing block devices (virtual disks).  If pressed again
185 toggles back to showing domains.
186
187 =item I<P>
188
189 Sort by %CPU.
190
191 =item I<M>
192
193 Sort by memory.
194
195 =item I<T>
196
197 Sort by total time.
198
199 =item I<N>
200
201 Sort by domain ID.
202
203 =item I<F>
204
205 Select the sort field interactively (there are other
206 sort fields you can choose using this key).
207
208 =item I<W>
209
210 This creates or overwrites the init file with the current settings.
211
212 This key is disabled if I<--no-init-file> was specified on the
213 command line or if I<overwrite-init-file false> is given in
214 the init file.
215
216 =back
217
218 =head1 INIT FILE
219
220 When virt-top starts up, it reads initial settings from the
221 file I<.virt-toprc> in the user's home directory.
222
223 The name of this file may be overridden using the I<--init-file
224 filename> command line option or may be disabled entirely using
225 I<--no-init-file>.
226
227 The init file has a simple format.  Blank lines and comments
228 beginning with I<#> are ignored.  Everything else is a set of
229 I<key value> pairs, described below.
230
231 =over 4
232
233 =item B<display> I<task|pcpu|block|net>
234
235 Sets the major display mode to one of I<task> (tasks, the
236 default), I<pcpu> (physical CPUs), I<block> (block devices),
237 or I<net> (network interfaces).
238
239 =item B<delay> I<secs>
240
241 Sets the delay between display updates in seconds.
242
243 =item B<hist-cpu> I<secs>
244
245 Sets the historical CPU delay in seconds.
246
247 =item B<iterations> I<n>
248
249 Sets the number of iterations to run before we exit.  Setting
250 this to I<-1> means to run continuously.
251
252 =item B<sort> I<cpu|mem|time|id|name|...>
253
254 Sets the sort order.  The option names are the same as for
255 the command line I<-o> option.
256
257 =item B<connect> I<uri>
258
259 Sets the default connection URI.
260
261 =item B<debug> I<filename>
262
263 Sets the default filename to use for debug and error messages.
264
265 =item B<csv> I<filename>
266
267 Enables CSV output to the named file.
268
269 =item B<csv-cpu> I<true|false>
270
271 Enable or disable domain CPU stats in CSV output.
272
273 =item B<csv-block> I<true|false>
274
275 Enable or disable domain block device stats in CSV output.
276
277 =item B<csv-net> I<true|false>
278
279 Enable or disable domain network interface stats in CSV output.
280
281 =item B<batch> I<true|false>
282
283 Sets batch mode.
284
285 =item B<secure> I<true|false>
286
287 Sets secure mode.
288
289 =item B<script> I<true|false>
290
291 Sets script mode.
292
293 =item B<overwrite-init-file> I<false>
294
295 If set to I<false> then the I<W> key will not overwrite the
296 init file.
297
298 =back
299
300
301 Note that in the current implementation, options specified in
302 the init file override options specified on the command line.
303 This is a bug and this behaviour may change in the future.
304
305 =head1 SEE ALSO
306
307 L<top(1)>,
308 L<virsh(1)>,
309 L<xm(1)>,
310 L<xentop(1)>,
311 L<http://www.libvirt.org/>,
312 L<http://et.redhat.com/~rjones/>,
313 L<http://caml.inria.fr/>
314
315 =head1 AUTHORS
316
317 Richard W.M. Jones <rjones @ redhat . com>
318
319 =head1 REPORTING BUGS
320
321 Bugs can be viewed on the Red Hat Bugzilla page:
322 L<https://bugzilla.redhat.com/>.
323
324 If you find a bug in virt-top, please follow these steps to report it:
325
326 =over 4
327
328 =item 1. Check for existing bug reports
329
330 Go to L<https://bugzilla.redhat.com/> and search for similar bugs.
331 Someone may already have reported the same bug, and they may even
332 have fixed it.
333
334 =item 2. Capture debug and error messages
335
336 Run
337
338  virt-top --debug virt-top.log
339
340 and keep I<virt-top.log>.  It contains error messages which you
341 should submit with your bug report.
342
343 =item 3. Get version of virt-top and version of libvirt.
344
345 In virt-top, press the I<h> (help) key, and write down the version of
346 virt-top and the version of libvirt.  They are shown in the first
347 line.
348
349 =item 4. Submit a bug report.
350
351 Go to L<https://bugzilla.redhat.com/> and enter a new bug.
352 Please describe the problem in as much detail as possible.
353
354 Remember to include the version numbers (step 3) and the debug
355 messages file (step 2).
356
357 =item 5. Assign the bug to rjones @ redhat.com
358
359 Assign or reassign the bug to B<rjones @ redhat.com> (without the
360 spaces).  You can also send me an email with the bug number if you
361 want a faster response.
362
363 =back
364
365 =end