3ec0dacfae90056730e823e919d645d79832bd1e
[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<--debug filename>
103
104 Send debug and error messages to I<filename>.
105 To send error messages to syslog you can do:
106
107  virt-top --debug >(logger -t virt-top)
108
109 See also REPORTING BUGS below.
110
111 =item B<--init-file filename>
112
113 Read I<filename> as the init file instead of the default which is
114 I<$HOME/.virt-toprc>.  See also INIT FILE below.
115
116 =item B<--no-init-file>
117
118 Do not read any init file.
119
120 =item B<--help>
121
122 Display usage summary.
123
124 =back
125
126 =head1 KEYS
127
128 Note that keys are case sensitive.  For example use upper-case I<P>
129 (shift P) to sort by %CPU.  I<^> before a key means a Ctrl key, so
130 I<^L> is Ctrl L.
131
132 =over 4
133
134 =item I<space> or I<^L>
135
136 Updates the display.
137
138 =item I<q>
139
140 Quits the program.
141
142 =item I<h>
143
144 Displays help.
145
146 =item I<s> or I<d>
147
148 Change the delay between screen updates.
149
150 =item I<0> (number 0)
151
152 Show the normal list of domains display.
153
154 =item I<1> (number 1)
155
156 Toggle into showing physical CPUs.  If pressed
157 again toggles back to showing domains (the normal
158 display).
159
160 =item I<2>
161
162 Toggle into showing network interfaces.  If pressed
163 again toggles back to showing domains.
164
165 =item I<3>
166
167 Toggle into showing block devices (virtual disks).  If pressed again
168 toggles back to showing domains.
169
170 =item I<P>
171
172 Sort by %CPU.
173
174 =item I<M>
175
176 Sort by memory.
177
178 =item I<T>
179
180 Sort by total time.
181
182 =item I<N>
183
184 Sort by domain ID.
185
186 =item I<F>
187
188 Select the sort field interactively (there are other
189 sort fields you can choose using this key).
190
191 =item I<W>
192
193 This creates or overwrites the init file with the current settings.
194
195 This key is disabled if I<--no-init-file> was specified on the
196 command line or if I<overwrite-init-file false> is given in
197 the init file.
198
199 =back
200
201 =head1 INIT FILE
202
203 When virt-top starts up, it reads initial settings from the
204 file I<.virt-toprc> in the user's home directory.
205
206 The name of this file may be overridden using the I<--init-file
207 filename> command line option or may be disabled entirely using
208 I<--no-init-file>.
209
210 The init file has a simple format.  Blank lines and comments
211 beginning with I<#> are ignored.  Everything else is a set of
212 I<key value> pairs, described below.
213
214 =over 4
215
216 =item B<display> I<task|pcpu|block|net>
217
218 Sets the major display mode to one of I<task> (tasks, the
219 default), I<pcpu> (physical CPUs), I<block> (block devices),
220 or I<net> (network interfaces).
221
222 =item B<delay> I<secs>
223
224 Sets the delay between display updates in seconds.
225
226 =item B<hist-cpu> I<secs>
227
228 Sets the historical CPU delay in seconds.
229
230 =item B<iterations> I<n>
231
232 Sets the number of iterations to run before we exit.  Setting
233 this to I<-1> means to run continuously.
234
235 =item B<sort> I<cpu|mem|time|id|name|...>
236
237 Sets the sort order.  The option names are the same as for
238 the command line I<-o> option.
239
240 =item B<connect> I<uri>
241
242 Sets the default connection URI.
243
244 =item B<debug> I<filename>
245
246 Sets the default filename to use for debug and error messages.
247
248 =item B<csv> I<filename>
249
250 Enables CSV output to the named file.
251
252 =item B<batch> I<true|false>
253
254 Sets batch mode.
255
256 =item B<secure> I<true|false>
257
258 Sets secure mode.
259
260 =item B<overwrite-init-file> I<false>
261
262 If set to I<false> then the I<W> key will not overwrite the
263 init file.
264
265 =back
266
267
268 Note that in the current implementation, options specified in
269 the init file override options specified on the command line.
270 This is a bug and this behaviour may change in the future.
271
272 =head1 SEE ALSO
273
274 L<top(1)>,
275 L<virsh(1)>,
276 L<xm(1)>,
277 L<xentop(1)>,
278 L<http://www.libvirt.org/>,
279 L<http://et.redhat.com/~rjones/>,
280 L<http://caml.inria.fr/>
281
282 =head1 AUTHORS
283
284 Richard W.M. Jones <rjones @ redhat . com>
285
286 =head1 REPORTING BUGS
287
288 Bugs can be viewed on the Red Hat Bugzilla page:
289 L<https://bugzilla.redhat.com/>.
290
291 If you find a bug in virt-top, please follow these steps to report it:
292
293 =over 4
294
295 =item 1. Check for existing bug reports
296
297 Go to L<https://bugzilla.redhat.com/> and search for similar bugs.
298 Someone may already have reported the same bug, and they may even
299 have fixed it.
300
301 =item 2. Capture debug and error messages
302
303 Run
304
305  virt-top --debug virt-top.log
306
307 and keep I<virt-top.log>.  It contains error messages which you
308 should submit with your bug report.
309
310 =item 3. Get version of virt-top and version of libvirt.
311
312 In virt-top, press the I<h> (help) key, and write down the version of
313 virt-top and the version of libvirt.  They are shown in the first
314 line.
315
316 =item 4. Submit a bug report.
317
318 Go to L<https://bugzilla.redhat.com/> and enter a new bug.
319 Please describe the problem in as much detail as possible.
320
321 Remember to include the version numbers (step 3) and the debug
322 messages file (step 2).
323
324 =item 5. Assign the bug to rjones @ redhat.com
325
326 Assign or reassign the bug to B<rjones @ redhat.com> (without the
327 spaces).  You can also send me an email with the bug number if you
328 want a faster response.
329
330 =back
331
332 =end