~ubuntu-branches/ubuntu/raring/virt-top/raring

« back to all changes in this revision

Viewing changes to virt-top/virt-top.txt

  • Committer: Package Import Robot
  • Author(s): Laurent Léonard
  • Date: 2012-04-22 00:05:27 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120422000527-fdgawco5grlled14
Tags: 1.0.7-1
* [01344ee] Imported Upstream version 1.0.7
* [0eb6b4e] Drop patch
  - 0002-Ensure-manpages-get-built-when-using-native-compiler.patch - fixed
    upstream
* [32b2702] Bump libvirt-ocaml-dev build dependency version to 0.6.1.1
* [f0aee95] Bump Standards-Version to 3.9.3
* [87aa69d] Change maintainer to Debian Libvirt Maintainers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
NAME
 
2
    virt-top - 'top'-like utility for virtualization stats
 
3
 
 
4
SUMMARY
 
5
    virt-top [-options]
 
6
 
 
7
DESCRIPTION
 
8
    virt-top is a top(1)-like utility for showing stats of virtualized
 
9
    domains. Many keys and command line options are the same as for ordinary
 
10
    *top*.
 
11
 
 
12
    It uses libvirt so it is capable of showing stats across a variety of
 
13
    different virtualization systems.
 
14
 
 
15
OPTIONS
 
16
    -1  Display physical CPUs by default (instead of domains). When virt-top
 
17
        is running, use the *1* key to toggle between physical CPUs and
 
18
        domains display.
 
19
 
 
20
    -2  Display network interfaces by default (instead of domains). When
 
21
        virt-top is running, use the *2* key to toggle between network
 
22
        interfaces and domains display.
 
23
 
 
24
    -3  Display block devices (virtual disks) by default (instead of
 
25
        domains). When virt-top is running, use the *3* key to toggle
 
26
        between block devices and domains display.
 
27
 
 
28
    -b  Batch mode. In this mode keypresses are ignored.
 
29
 
 
30
    -c uri or --connect uri
 
31
        Connect to the libvirt URI given.
 
32
 
 
33
        To connect to QEMU/KVM you would normally do *-c qemu:///system*
 
34
 
 
35
        To connect to Xen on the same host, do *-c xen:///*
 
36
 
 
37
        To connect to libvirtd on a remote machine you would normally do *-c
 
38
        qemu://host/system*
 
39
 
 
40
        If this option is not given then virt-top connects by default to
 
41
        whatever is the default hypervisor for libvirt, although this can be
 
42
        overridden by setting environment variables.
 
43
 
 
44
        See the libvirt documentation at <http://libvirt.org/uri.html> for
 
45
        further information.
 
46
 
 
47
    -d delay
 
48
        Set the delay between screen updates in seconds. The default is 3.0
 
49
        seconds. You can change this while virt-top is running by pressing
 
50
        either *s* or *d* key.
 
51
 
 
52
    -n iterations
 
53
        Set the number of iterations to run. The default is to run
 
54
        continuously.
 
55
 
 
56
    -o sort
 
57
        Set the sort order to one of: cpu (sort by %CPU used), mem (sort by
 
58
        total memory), time (sort by total time), id (sort by domain ID),
 
59
        name (sort by domain name), netrx (sort by network received bytes),
 
60
        nettx (sort by network transmitted bytes), blockrdrq (sort by block
 
61
        device [disk] read requests), blockwrrq (sort by block device [disk]
 
62
        write requests).
 
63
 
 
64
        While virt-top is running you can change the sort order using keys
 
65
        *P* (cpu), *M* (memory), *T* (total time), *N* (domain ID), *F*
 
66
        (interactively select the sort field).
 
67
 
 
68
    -s  Secure mode. Currently this does nothing.
 
69
 
 
70
    --hist-cpu secs
 
71
        Set the time in seconds between updates of the historical %CPU at
 
72
        the top right of the display.
 
73
 
 
74
    --csv file.csv
 
75
        Write the statistics to file *file.csv*. First a header is written
 
76
        showing the statistics being recorded in each column, then one line
 
77
        is written for each screen update. The CSV file can be loaded
 
78
        directly by most spreadsheet programs.
 
79
 
 
80
        Currently the statistics which this records vary between releases of
 
81
        virt-top (but the column headers will stay the same, so you can use
 
82
        those to process the CSV file).
 
83
 
 
84
        Not every version of virt-top supports CSV output - it depends how
 
85
        the program was compiled (see *README* file in the source
 
86
        distribution for details).
 
87
 
 
88
        To save space you can compress your CSV files (if your shell
 
89
        supports this feature, eg. *bash*):
 
90
 
 
91
         virt-top --csv >(gzip -9 > output.csv.gz)
 
92
 
 
93
        You can use a similar trick to split the CSV file up. In this
 
94
        example the CSV file is split every 1000 lines into files called
 
95
        *output.csv.00*, *output.csv.01* etc.
 
96
 
 
97
         virt-top --csv >(split -d -l 1000 - output.csv.)
 
98
 
 
99
    --no-csv-cpu
 
100
        Disable domain CPU stats in CSV output.
 
101
 
 
102
    --no-csv-mem
 
103
        Disable domain memory stats in CSV output.
 
104
 
 
105
    --no-csv-block
 
106
        Disable domain block device stats in CSV output.
 
107
 
 
108
    --no-csv-net
 
109
        Disable domain network interface stats in CSV output.
 
110
 
 
111
    --debug filename
 
112
        Send debug and error messages to *filename*. To send error messages
 
113
        to syslog you can do:
 
114
 
 
115
         virt-top --debug >(logger -t virt-top)
 
116
 
 
117
        See also REPORTING BUGS below.
 
118
 
 
119
    --init-file filename
 
120
        Read *filename* as the init file instead of the default which is
 
121
        *$HOME/.virt-toprc*. See also INIT FILE below.
 
122
 
 
123
    --no-init-file
 
124
        Do not read any init file.
 
125
 
 
126
    --script
 
127
        Script mode. There will be no user interface. This is most useful
 
128
        when used together with the *--csv* and *-n* options.
 
129
 
 
130
    --stream
 
131
        Stream mode. All output is sent to stdout. This can be used from
 
132
        shell scripts etc. There is no user interface.
 
133
 
 
134
    --block-in-bytes
 
135
        Show I/O statistics in Bytes. Default is shown in the number of
 
136
        Requests.
 
137
 
 
138
    --end-time time
 
139
        The program will exit at the *time* given.
 
140
 
 
141
        The time may be given in one of the following formats:
 
142
 
 
143
        *YYYY-MM-DD HH:MM:SS*
 
144
            End time is the date and time given.
 
145
 
 
146
        *HH:MM:SS*
 
147
            End time is the time given, today.
 
148
 
 
149
        *+HH:MM:SS*
 
150
            End time is HH hours, MM minutes, SS seconds in the future
 
151
            (counted from the moment that program starts).
 
152
 
 
153
        *+secs*
 
154
            End time is *secs* seconds in the future.
 
155
 
 
156
        For example to run the program for 3 minutes you could do:
 
157
 
 
158
         virt-top --end-time +00:03:00
 
159
 
 
160
        or:
 
161
 
 
162
         virt-top --end-time +180
 
163
 
 
164
        Not every version of virt-top supports this option - it depends how
 
165
        the program was compiled (see *README* file in the source
 
166
        distribution for details).
 
167
 
 
168
    --help
 
169
        Display usage summary.
 
170
 
 
171
    --version
 
172
        Display version number and exit.
 
173
 
 
174
KEYS
 
175
    Note that keys are case sensitive. For example use upper-case *P* (shift
 
176
    P) to sort by %CPU. *^* before a key means a Ctrl key, so *^L* is Ctrl
 
177
    L.
 
178
 
 
179
    *space* or *^L*
 
180
        Updates the display.
 
181
 
 
182
    *q* Quits the program.
 
183
 
 
184
    *h* Displays help.
 
185
 
 
186
    *s* or *d*
 
187
        Change the delay between screen updates.
 
188
 
 
189
    *B* Toggle Block I/O statistics so they are shown in either bytes or
 
190
        requests.
 
191
 
 
192
    *0* (number 0)
 
193
        Show the normal list of domains display.
 
194
 
 
195
    *1* (number 1)
 
196
        Toggle into showing physical CPUs. If pressed again toggles back to
 
197
        showing domains (the normal display).
 
198
 
 
199
    *2* Toggle into showing network interfaces. If pressed again toggles
 
200
        back to showing domains.
 
201
 
 
202
    *3* Toggle into showing block devices (virtual disks). If pressed again
 
203
        toggles back to showing domains.
 
204
 
 
205
    *P* Sort by %CPU.
 
206
 
 
207
    *M* Sort by total memory. Note that this shows the total memory
 
208
        allocated to the guest, not the memory being used.
 
209
 
 
210
    *T* Sort by total time.
 
211
 
 
212
    *N* Sort by domain ID.
 
213
 
 
214
    *F* Select the sort field interactively (there are other sort fields you
 
215
        can choose using this key).
 
216
 
 
217
    *W* This creates or overwrites the init file with the current settings.
 
218
 
 
219
        This key is disabled if *--no-init-file* was specified on the
 
220
        command line or if *overwrite-init-file false* is given in the init
 
221
        file.
 
222
 
 
223
INIT FILE
 
224
    When virt-top starts up, it reads initial settings from the file
 
225
    *.virt-toprc* in the user's home directory.
 
226
 
 
227
    The name of this file may be overridden using the *--init-file filename*
 
228
    command line option or may be disabled entirely using *--no-init-file*.
 
229
 
 
230
    The init file has a simple format. Blank lines and comments beginning
 
231
    with *#* are ignored. Everything else is a set of *key value* pairs,
 
232
    described below.
 
233
 
 
234
    display *task|pcpu|block|net*
 
235
        Sets the major display mode to one of *task* (tasks, the default),
 
236
        *pcpu* (physical CPUs), *block* (block devices), or *net* (network
 
237
        interfaces).
 
238
 
 
239
    delay *secs*
 
240
        Sets the delay between display updates in seconds.
 
241
 
 
242
    hist-cpu *secs*
 
243
        Sets the historical CPU delay in seconds.
 
244
 
 
245
    iterations *n*
 
246
        Sets the number of iterations to run before we exit. Setting this to
 
247
        *-1* means to run continuously.
 
248
 
 
249
    sort *cpu|mem|time|id|name|...*
 
250
        Sets the sort order. The option names are the same as for the
 
251
        command line *-o* option.
 
252
 
 
253
    connect *uri*
 
254
        Sets the default connection URI.
 
255
 
 
256
    debug *filename*
 
257
        Sets the default filename to use for debug and error messages.
 
258
 
 
259
    csv *filename*
 
260
        Enables CSV output to the named file.
 
261
 
 
262
    csv-cpu *true|false*
 
263
        Enable or disable domain CPU stats in CSV output.
 
264
 
 
265
    csv-mem *true|false*
 
266
        Enable or disable domain memory stats in CSV output.
 
267
 
 
268
    csv-block *true|false*
 
269
        Enable or disable domain block device stats in CSV output.
 
270
 
 
271
    csv-net *true|false*
 
272
        Enable or disable domain network interface stats in CSV output.
 
273
 
 
274
    batch *true|false*
 
275
        Sets batch mode.
 
276
 
 
277
    secure *true|false*
 
278
        Sets secure mode.
 
279
 
 
280
    script *true|false*
 
281
        Sets script mode.
 
282
 
 
283
    stream *true|false*
 
284
        Sets stream mode.
 
285
 
 
286
    block-in-bytes *true|false*
 
287
        Show block device statistics in bytes.
 
288
 
 
289
    end-time *time*
 
290
        Set the time at which the program exits. See above for the time
 
291
        formats supported.
 
292
 
 
293
    overwrite-init-file *false*
 
294
        If set to *false* then the *W* key will not overwrite the init file.
 
295
 
 
296
    Note that in the current implementation, options specified in the init
 
297
    file override options specified on the command line. This is a bug and
 
298
    this behaviour may change in the future.
 
299
 
 
300
NOTES
 
301
  Block I/O statistics
 
302
    This I/O value is the amount of I/O since the previous iteration of
 
303
    virt-top. To calculate speed of I/O, you should divide the number by
 
304
    delay secs.
 
305
 
 
306
  NETWORK RX BYTES AND PACKETS
 
307
    Libvirt/virt-top has no way to know that a packet transmitted to a guest
 
308
    was received (eg. if the guest is not listening). In the network RX
 
309
    stats, virt-top reports the packets transmitted to the guest, on the
 
310
    basis that the guest might receive them.
 
311
 
 
312
    In particular this includes broadcast packets. Because of the way that
 
313
    Linux bridges work, if the guest is connected to a bridge, it will
 
314
    probably see a steady "background noise" of RX packets even when the
 
315
    network interface is idle or down. These are caused by STP packets
 
316
    generated by the bridge.
 
317
 
 
318
  DEBUGGING LIBVIRT ISSUES
 
319
    virt-top tries to turn libvirt errors into informative messages. However
 
320
    if libvirt initialization fails then this is not possible. Instead you
 
321
    will get an obscure error like:
 
322
 
 
323
     libvir: error : Unknown failure
 
324
     Fatal error: exception Libvirt.Virterror(...)
 
325
 
 
326
    To see the cause of libvirt errors in more detail, enable libvirt
 
327
    debugging by setting this environment variable:
 
328
 
 
329
     export LIBVIRT_DEBUG=1
 
330
 
 
331
SEE ALSO
 
332
    top(1), virsh(1), <http://www.libvirt.org/ocaml/>,
 
333
    <http://www.libvirt.org/>, <http://people.redhat.com/~rjones/>,
 
334
    <http://caml.inria.fr/>
 
335
 
 
336
AUTHORS
 
337
    Richard W.M. Jones <rjones @ redhat . com>
 
338
 
 
339
COPYRIGHT
 
340
    (C) Copyright 2007-2011 Red Hat Inc., Richard W.M. Jones
 
341
    http://libvirt.org/
 
342
 
 
343
    This program is free software; you can redistribute it and/or modify it
 
344
    under the terms of the GNU General Public License as published by the
 
345
    Free Software Foundation; either version 2 of the License, or (at your
 
346
    option) any later version.
 
347
 
 
348
    This program is distributed in the hope that it will be useful, but
 
349
    WITHOUT ANY WARRANTY; without even the implied warranty of
 
350
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 
351
    Public License for more details.
 
352
 
 
353
    You should have received a copy of the GNU General Public License along
 
354
    with this program; if not, write to the Free Software Foundation, Inc.,
 
355
    675 Mass Ave, Cambridge, MA 02139, USA.
 
356
 
 
357
REPORTING BUGS
 
358
    Bugs can be viewed on the Red Hat Bugzilla page:
 
359
    <https://bugzilla.redhat.com/>.
 
360
 
 
361
    If you find a bug in virt-top, please follow these steps to report it:
 
362
 
 
363
    1. Check for existing bug reports
 
364
        Go to <https://bugzilla.redhat.com/> and search for similar bugs.
 
365
        Someone may already have reported the same bug, and they may even
 
366
        have fixed it.
 
367
 
 
368
    2. Capture debug and error messages
 
369
        Run
 
370
 
 
371
         virt-top --debug virt-top.log
 
372
 
 
373
        and keep *virt-top.log*. It contains error messages which you should
 
374
        submit with your bug report.
 
375
 
 
376
    3. Get version of virt-top and version of libvirt.
 
377
        Use:
 
378
 
 
379
         virt-top --version
 
380
 
 
381
        If you can get the precise version of libvirt you are using then
 
382
        that too is helpful.
 
383
 
 
384
    4. Submit a bug report.
 
385
        Go to <https://bugzilla.redhat.com/> and enter a new bug. Please
 
386
        describe the problem in as much detail as possible.
 
387
 
 
388
        Remember to include the version numbers (step 3) and the debug
 
389
        messages file (step 2).
 
390
 
 
391
    5. Assign the bug to rjones @ redhat.com
 
392
        Assign or reassign the bug to rjones @ redhat.com (without the
 
393
        spaces). You can also send me an email with the bug number if you
 
394
        want a faster response.
 
395