summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-11-22 13:18:32 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-11-22 13:21:17 +0000
commit7b3137e664c3f4edf6ac7043a34c4166567e17bd (patch)
treea4f447b00286f61401bb197422ac95e566b1a8b1
parentce6c4eeabe3f2ce96d11d6d55c3ac6aca542d4c8 (diff)
downloadlibguestfs-7b3137e664c3f4edf6ac7043a34c4166567e17bd.tar.gz
libguestfs-7b3137e664c3f4edf6ac7043a34c4166567e17bd.tar.xz
libguestfs-7b3137e664c3f4edf6ac7043a34c4166567e17bd.zip
df, testing: Add notes on virt-df numbers (thanks Kashyap Chamarthy).
-rwxr-xr-xdf/virt-df.pod26
-rw-r--r--examples/guestfs-testing.pod24
2 files changed, 49 insertions, 1 deletions
diff --git a/df/virt-df.pod b/df/virt-df.pod
index df58b4c2..24b35837 100755
--- a/df/virt-df.pod
+++ b/df/virt-df.pod
@@ -188,6 +188,32 @@ Enable tracing of libguestfs API calls.
=back
+=head1 STATVFS NUMBERS
+
+C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)>
+system call. You can get the same information directly, either from
+the host (using libguestfs) or inside the guest:
+
+=over 4
+
+=item From the host
+
+Run this command:
+
+ guestfish --ro -d GuestName -i statvfs /
+
+(change C</> to see stats for other filesystems).
+
+=item From inside the guest
+
+Run this command:
+
+ python -c 'import os; s = os.statvfs ("/"); print s'
+
+(change C</> to see stats for other filesystems).
+
+=back
+
=head1 NOTE ABOUT CSV FORMAT
Comma-separated values (CSV) is a deceptive format. It I<seems> like
diff --git a/examples/guestfs-testing.pod b/examples/guestfs-testing.pod
index adf5b04d..c35c3b86 100644
--- a/examples/guestfs-testing.pod
+++ b/examples/guestfs-testing.pod
@@ -102,7 +102,29 @@ L<virt-df(1)> lists disk space. Run:
virt-df
-Do the results match what's reported inside the guests?
+You can try comparing this to the results from L<df(1)> inside the
+guest, but there are some provisos:
+
+=over 4
+
+=item *
+
+The guest must be idle.
+
+=item *
+
+The guest disks must be synched using L<sync(1)>.
+
+=item *
+
+Any action such as booting the guest will write log files causing the
+numbers to change.
+
+=back
+
+We don't guarantee that the numbers will be identical even under these
+circumstances. They should be similar. It would indicate a bug if
+you saw greatly differing numbers.
=head2 Try importing virt-df CSV output into a spreadsheet or database.