Remove bogus =end from end of manpage.
[virt-top.git] / virt-df / virt-df.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-DF 1"
132 .TH VIRT-DF 1 "2008-03-04" "ocaml-libvirt-0.4.0.3" "Virtualization Support"
133 .SH "NAME"
134 virt\-df \- 'df'\-like utility for virtualization stats
135 .SH "SUMMARY"
136 .IX Header "SUMMARY"
137 virt-df [\-options]
138 .SH "DESCRIPTION"
139 .IX Header "DESCRIPTION"
140 virt-df is a \fIdf\fR\|(1)\-like utility for showing the actual disk usage
141 of guests.  Many command line options are the same as for ordinary
142 \&\fIdf\fR.
143 .PP
144 It uses libvirt so it is capable of showing stats across a variety of
145 different virtualization systems.
146 .PP
147 There are some shortcomings to the whole approach of reading disk
148 state from outside the guest.  Please read \s-1SHORTCOMINGS\s0 section below
149 for more details.
150 .SH "OPTIONS"
151 .IX Header "OPTIONS"
152 .IP "\fB\-a\fR, \fB\-\-all\fR" 4
153 .IX Item "-a, --all"
154 Show all domains.  The default is show only running (active) domains.
155 .IP "\fB\-c uri\fR, \fB\-\-connect uri\fR" 4
156 .IX Item "-c uri, --connect uri"
157 Connect to libvirt \s-1URI\s0.  The default is to connect to the default
158 libvirt \s-1URI\s0, normally Xen.
159 .IP "\fB\-h\fR, \fB\-\-human\-readable\fR" 4
160 .IX Item "-h, --human-readable"
161 Display human-readable sizes (eg. 10GiB).
162 .IP "\fB\-i\fR, \fB\-\-inodes\fR" 4
163 .IX Item "-i, --inodes"
164 Display inode information.
165 .IP "\fB\-\-help\fR" 4
166 .IX Item "--help"
167 Display usage summary.
168 .IP "\fB\-\-version\fR" 4
169 .IX Item "--version"
170 Display version and exit.
171 .SH "SHORTCOMINGS"
172 .IX Header "SHORTCOMINGS"
173 virt-df spies on the guest's disk image to try to work out how much
174 disk space it is actually using.  There are some shortcomings to this,
175 described here.
176 .PP
177 (1) It does not work over remote connections.  The storage \s-1API\s0 does
178 not support peeking into remote disks, and libvirt has rejected a
179 request to add this support.
180 .PP
181 (2) It only understands a limited set of partition types.  Assuming
182 that the files and partitions that we get back from libvirt / Xen
183 correspond to block devices in the guests, we can go some way towards
184 manually parsing those partitions to find out what they contain.  We
185 can read the \s-1MBR\s0, \s-1LVM\s0, superblocks and so on.  However that's a lot of
186 parsing work, and currently there is no library which understands a
187 wide range of partition schemes and filesystem types (not even
188 libparted which doesn't support \s-1LVM\s0 yet).  The Linux kernel does
189 support that, but there's not really any good way to access that work.
190 .PP
191 The current implementation uses a hand-coded parser which understands
192 some simple formats (\s-1MBR\s0, \s-1LVM2\s0, ext2/3).  In future we should use
193 something like libparted.
194 .PP
195 (3) The statistics you get are delayed.  The real state of, for
196 example, an ext2 filesystem is only stored in the memory of the
197 guest's kernel.  The ext2 superblock contains some meta-information
198 about blocks used and free, but this superblock is not up to date.  In
199 fact the guest kernel may not update it even on a 'sync', not until
200 the filesystem is unmounted.  Some operations do appear to write the
201 superblock, for example \fIfsync\fR\|(2) [that is my reading of the ext2/3
202 source code at least].
203 .SH "SECURITY"
204 .IX Header "SECURITY"
205 The current code is probably not secure against malicious guests.  In
206 particular a malicious guest can set up a disk in such a way that disk
207 structures with loops can cause virt-df to spin forever.  We are
208 preparing a parsing library which can fix these sorts of problems.
209 .PP
210 In the meantime, do not run virt-df on untrusted guests.
211 .SH "SEE ALSO"
212 .IX Header "SEE ALSO"
213 \&\fIdf\fR\|(1),
214 \&\fIvirsh\fR\|(1),
215 \&\fIxm\fR\|(1),
216 <http://www.libvirt.org/ocaml/>,
217 <http://www.libvirt.org/>,
218 <http://et.redhat.com/~rjones/>,
219 <http://caml.inria.fr/>
220 .SH "AUTHORS"
221 .IX Header "AUTHORS"
222 Richard W.M. Jones <rjones @ redhat . com>
223 .SH "COPYRIGHT"
224 .IX Header "COPYRIGHT"
225 (C) Copyright 2007\-2008 Red Hat Inc., Richard W.M. Jones
226 http://libvirt.org/
227 .PP
228 This program is free software; you can redistribute it and/or modify
229 it under the terms of the \s-1GNU\s0 General Public License as published by
230 the Free Software Foundation; either version 2 of the License, or
231 (at your option) any later version.
232 .PP
233 This program is distributed in the hope that it will be useful,
234 but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
235 \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.  See the
236 \&\s-1GNU\s0 General Public License for more details.
237 .PP
238 You should have received a copy of the \s-1GNU\s0 General Public License
239 along with this program; if not, write to the Free Software
240 Foundation, Inc., 675 Mass Ave, Cambridge, \s-1MA\s0 02139, \s-1USA\s0.
241 .SH "REPORTING BUGS"
242 .IX Header "REPORTING BUGS"
243 Bugs can be viewed on the Red Hat Bugzilla page:
244 <https://bugzilla.redhat.com/>.
245 .PP
246 If you find a bug in virt\-df, please follow these steps to report it:
247 .IP "1. Check for existing bug reports" 4
248 .IX Item "1. Check for existing bug reports"
249 Go to <https://bugzilla.redhat.com/> and search for similar bugs.
250 Someone may already have reported the same bug, and they may even
251 have fixed it.
252 .IP "2. Capture debug and error messages" 4
253 .IX Item "2. Capture debug and error messages"
254 Run
255 .Sp
256 .Vb 1
257 \& virt-df > virt-df.log 2>&1
258 .Ve
259 .Sp
260 and keep \fIvirt\-df.log\fR.  It contains error messages which you should
261 submit with your bug report.
262 .IP "3. Get version of virt-df and version of libvirt." 4
263 .IX Item "3. Get version of virt-df and version of libvirt."
264 Run
265 .Sp
266 .Vb 1
267 \& virt-df --version
268 .Ve
269 .IP "4. Submit a bug report." 4
270 .IX Item "4. Submit a bug report."
271 Go to <https://bugzilla.redhat.com/> and enter a new bug.
272 Please describe the problem in as much detail as possible.
273 .Sp
274 Remember to include the version numbers (step 3) and the debug
275 messages file (step 2).
276 .IP "5. Assign the bug to rjones @ redhat.com" 4
277 .IX Item "5. Assign the bug to rjones @ redhat.com"
278 Assign or reassign the bug to \fBrjones @ redhat.com\fR (without the
279 spaces).  You can also send me an email with the bug number if you
280 want a faster response.