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