From b46aee37b60c9e5e8c7a808b0f91fcf1a0d98103 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Rewrite manual page. --- virt-df/virt-df.1 | 31 +++++++++++++++++-------------- virt-df/virt-df.pod | 28 +++++++++++++++------------- virt-df/virt-df.txt | 27 ++++++++++++++------------- 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/virt-df/virt-df.1 b/virt-df/virt-df.1 index 59dd6fc..35ab421 100644 --- a/virt-df/virt-df.1 +++ b/virt-df/virt-df.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "VIRT-DF 1" -.TH VIRT-DF 1 "2008-04-17" "virt-df-2.0.0" "Virtualization Support" +.TH VIRT-DF 1 "2008-06-10" "virt-df-2.1.1" "Virtualization Support" .SH "NAME" virt\-df \- 'df'\-like utility for virtualization stats .SH "SUMMARY" @@ -143,10 +143,6 @@ of guests. Many command line options are the same as for ordinary .PP It uses libvirt so it is capable of showing stats across a variety of different virtualization systems. -.PP -There are some shortcomings to the whole approach of reading disk -state from outside the guest. Please read \s-1SHORTCOMINGS\s0 section below -for more details. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-a\fR, \fB\-\-all\fR" 4 @@ -168,10 +164,12 @@ Emit debugging information on stderr. Please supply this if you report a bug. .IP "\fB\-h\fR, \fB\-\-human\-readable\fR" 4 .IX Item "-h, --human-readable" -Display human-readable sizes (eg. 10GiB). +Display human-readable sizes (eg. \*(L"10GiB\*(R" instead of large numbers). .IP "\fB\-i\fR, \fB\-\-inodes\fR" 4 .IX Item "-i, --inodes" Display inode information. +.Sp +This option only works for Unix-like filesystems. .IP "\fB\-\-help\fR" 4 .IX Item "--help" Display usage summary. @@ -183,17 +181,22 @@ specify the \fB\-t\fR option multiple times. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Display version and exit. +.SH "EXAMPLE" +.IX Header "EXAMPLE" +.Vb 5 +\& # virt-df +\& Filesystem 1K-blocks Used Available Type +\& f9x32kvm:hda1 190740 24817 165923 Linux ext2/3 +\& f9x32kvm:VolGroup/LogVol00 6568348 3401656 3166692 Linux ext2/3 +\& f9x32kvm:VolGroup/LogVol01 1015808 Linux swap +.Ve .SH "SHORTCOMINGS" .IX Header "SHORTCOMINGS" virt-df spies on the guest's disk image to try to work out how much disk space it is actually using. There are some shortcomings to this, described here. .PP -(1) It does not work over remote connections. The storage \s-1API\s0 does -not support peeking into remote disks, and libvirt has rejected a -request to add this support. -.PP -(2) It only understands a limited set of partition types. Assuming +(1) It only understands a limited set of partition types. Assuming that the files and partitions that we get back from libvirt / Xen correspond to block devices in the guests, we can go some way towards manually parsing those partitions to find out what they contain. We @@ -204,10 +207,10 @@ libparted which doesn't support \s-1LVM\s0 yet). The Linux kernel does support that, but there's not really any good way to access that work. .PP The current implementation uses a hand-coded parser which understands -some simple formats (\s-1MBR\s0, \s-1LVM2\s0, ext2/3). In future we should use -something like libparted. +some formats (\s-1MBR\s0, \s-1LVM2\s0, ext2/3, \s-1DOS\s0 \s-1FAT\s0, Windows \s-1NTFS\s0, Linux swap and +Linux suspend partitions). .PP -(3) The statistics you get are delayed. The real state of, for +(2) The statistics you get are delayed. The real state of, for example, an ext2 filesystem is only stored in the memory of the guest's kernel. The ext2 superblock contains some meta-information about blocks used and free, but this superblock is not up to date. In diff --git a/virt-df/virt-df.pod b/virt-df/virt-df.pod index 50ed7fe..f5dc3c3 100644 --- a/virt-df/virt-df.pod +++ b/virt-df/virt-df.pod @@ -15,10 +15,6 @@ I. It uses libvirt so it is capable of showing stats across a variety of different virtualization systems. -There are some shortcomings to the whole approach of reading disk -state from outside the guest. Please read SHORTCOMINGS section below -for more details. - =head1 OPTIONS =over 4 @@ -46,12 +42,14 @@ report a bug. =item B<-h>, B<--human-readable> -Display human-readable sizes (eg. 10GiB). +Display human-readable sizes (eg. "10GiB" instead of large numbers). =item B<-i>, B<--inodes> Display inode information. +This option only works for Unix-like filesystems. + =item B<--help> Display usage summary. @@ -68,17 +66,21 @@ Display version and exit. =back +=head1 EXAMPLE + + # virt-df + Filesystem 1K-blocks Used Available Type + f9x32kvm:hda1 190740 24817 165923 Linux ext2/3 + f9x32kvm:VolGroup/LogVol00 6568348 3401656 3166692 Linux ext2/3 + f9x32kvm:VolGroup/LogVol01 1015808 Linux swap + =head1 SHORTCOMINGS virt-df spies on the guest's disk image to try to work out how much disk space it is actually using. There are some shortcomings to this, described here. -(1) It does not work over remote connections. The storage API does -not support peeking into remote disks, and libvirt has rejected a -request to add this support. - -(2) It only understands a limited set of partition types. Assuming +(1) It only understands a limited set of partition types. Assuming that the files and partitions that we get back from libvirt / Xen correspond to block devices in the guests, we can go some way towards manually parsing those partitions to find out what they contain. We @@ -89,10 +91,10 @@ libparted which doesn't support LVM yet). The Linux kernel does support that, but there's not really any good way to access that work. The current implementation uses a hand-coded parser which understands -some simple formats (MBR, LVM2, ext2/3). In future we should use -something like libparted. +some formats (MBR, LVM2, ext2/3, DOS FAT, Windows NTFS, Linux swap and +Linux suspend partitions). -(3) The statistics you get are delayed. The real state of, for +(2) The statistics you get are delayed. The real state of, for example, an ext2 filesystem is only stored in the memory of the guest's kernel. The ext2 superblock contains some meta-information about blocks used and free, but this superblock is not up to date. In diff --git a/virt-df/virt-df.txt b/virt-df/virt-df.txt index 9ee6243..a8ab3dc 100644 --- a/virt-df/virt-df.txt +++ b/virt-df/virt-df.txt @@ -11,10 +11,6 @@ DESCRIPTION It uses libvirt so it is capable of showing stats across a variety of different virtualization systems. - There are some shortcomings to the whole approach of reading disk state - from outside the guest. Please read SHORTCOMINGS section below for more - details. - OPTIONS -a, --all Show all domains. The default is show only running (active) domains. @@ -34,11 +30,13 @@ OPTIONS report a bug. -h, --human-readable - Display human-readable sizes (eg. 10GiB). + Display human-readable sizes (eg. "10GiB" instead of large numbers). -i, --inodes Display inode information. + This option only works for Unix-like filesystems. + --help Display usage summary. @@ -50,16 +48,19 @@ OPTIONS --version Display version and exit. +EXAMPLE + # virt-df + Filesystem 1K-blocks Used Available Type + f9x32kvm:hda1 190740 24817 165923 Linux ext2/3 + f9x32kvm:VolGroup/LogVol00 6568348 3401656 3166692 Linux ext2/3 + f9x32kvm:VolGroup/LogVol01 1015808 Linux swap + SHORTCOMINGS virt-df spies on the guest's disk image to try to work out how much disk space it is actually using. There are some shortcomings to this, described here. - (1) It does not work over remote connections. The storage API does not - support peeking into remote disks, and libvirt has rejected a request to - add this support. - - (2) It only understands a limited set of partition types. Assuming that + (1) It only understands a limited set of partition types. Assuming that the files and partitions that we get back from libvirt / Xen correspond to block devices in the guests, we can go some way towards manually parsing those partitions to find out what they contain. We can read the @@ -70,10 +71,10 @@ SHORTCOMINGS really any good way to access that work. The current implementation uses a hand-coded parser which understands - some simple formats (MBR, LVM2, ext2/3). In future we should use - something like libparted. + some formats (MBR, LVM2, ext2/3, DOS FAT, Windows NTFS, Linux swap and + Linux suspend partitions). - (3) The statistics you get are delayed. The real state of, for example, + (2) The statistics you get are delayed. The real state of, for example, an ext2 filesystem is only stored in the memory of the guest's kernel. The ext2 superblock contains some meta-information about blocks used and free, but this superblock is not up to date. In fact the guest kernel -- 1.8.3.1