summaryrefslogtreecommitdiffstats
path: root/tools/virt-df
Commit message (Collapse)AuthorAgeFilesLines
* df: Rewrite virt-df in C.Richard W.M. Jones2010-11-251-669/+0
| | | | | | | | | | | | I have diffed the output from the original virt-df with this new version, and they agree very closely. Some differences: - Old virt-df have a divide-by-zero error in cases where the number of used inodes was 0. New virt-df fixes this. - New virt-df uses gnulib human_readable library which displays numbers to 3 significant figures for -h output (old version used an ad hoc function).
* df: Add --uuid option to print guest UUIDs instead of names (RHBZ#646821).Richard W.M. Jones2010-10-271-5/+31
|
* df: Specify format of disks (RHBZ#642934,CVE-2010-3851).Richard W.M. Jones2010-10-221-6/+47
| | | | | | The format parameter is taken from libvirt if available, else the user should supply the '--format' parameter (eg. for local disk files).
* df: Correctly quote libvirt domain and filesystem in --csv mode (RHBZ#639986).Richard W.M. Jones2010-10-181-1/+31
| | | | | This fixes virt-df --csv when used with libvirt domains that contain quotes, spaces, commas and other lesser-used characters.
* tools: Add section describing quoting libvirt domain names to docs (RHBZ#643624)Richard W.M. Jones2010-10-181-0/+7
|
* df: Add --one-per-guest option for using one appliance per guest.Richard W.M. Jones2010-09-201-44/+98
|
* df: Minimize the number of times we launch the libguestfs appliance.Richard Jones2010-07-161-40/+177
| | | | | | | | | | | | | | | This commit greatly improves the performance of the 'virt-df' command by batching as many disks as possible onto a single appliance. In many situations this means the appliance is launched only once, versus one launch per domain as before. However doing it this way is a lot more complex: (1) Because of limits in Linux and virtio-blk, we can only attach 26 disks maximum at a time to the appliance. (2) We have to use LVM filters (lvm-set-filter) to confine LVM to the disks of a single guest.
* virt-df: Disallow -h and --csv options together (RHBZ#600977).Richard Jones2010-06-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, if you used the -h and --csv options together you would get these warnings from virt-df: $ virt-df -h --csv Guest Virtual Machine,Filesystem,Size,Used,Available,Use% Argument "13.5G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "4.7G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "8.1G" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/VolGroup00/LogVol00",13,4,8,34.8% Argument "98.7M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "18.8M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. Argument "74.9M" isn't numeric in printf at /home/rjones/d/libguestfs/tools/virt-df line 298. "/dev/vg_trick/RHEL55x64","/dev/vda1",98,18,74,19.0% We could fix this so that the human-readable numbers get written into the CSV file. However would probably be wrong for most uses of the CSV format (databases and spreadsheets) since they would not be able to interpret these human-readable numbers, or worse could misinterpret, eg. thinking that "1M" and "1G" are both 1. Therefore this commit disallows this combination of options.
* virt-df: Display domains in sorted order.Richard Jones2010-05-141-1/+1
|
* Reduce imported functions in virt-df to ones which are actually used.Richard Jones2010-05-121-3/+1
|
* Documentation updates.Richard Jones2010-04-111-2/+2
| | | | | | | Fix copyright years. Fix URLs to point to new PRC site. Make sure guestfish(1) and guestfs(3) manpages reference the current list of tools.
* virt-df: Match output with native (coreutils) 'df' command (RHBZ#578123).Richard Jones2010-03-301-9/+11
| | | | | | | | | | | | | | | | | | | | This commit fixes the 'Use%' field in the output so it matches what coreutils' 'df' command would print. Firstly we change the calculation to use the space available to root, not the space available to non-root. This means it matches what 'df' when run as root in the guest would show. Secondly we display this rounded up to the next whole percent (ie. using ceil), which is also what 'df' does. Thirdly we change the regression test so it tests this. Note that even with these changes you are not guaranteed to get precisely the same figures from inside and outside the guest, as it depends on how quiescent the guest is and how recently the superblock was synced. Thanks: Rita Wu
* Remove unused Perl modules.Richard Jones2010-02-191-1/+0
| | | | These were 'use'd but not actually used.
* virt-df: Ignore domains which have ID 0.Richard Jones2009-11-171-0/+3
| | | | | | | | | This is the remainder of the fix for RHBZ#538041. Domains which have ID 0 are special domains. libvirt defines it as the "control plane OS". Only Xen and HyperV have this behaviour, and in both cases we should ignore those domains for the purposes of virt-df (user can just run "df" if they need that information for the dom0).
* virt-df: Turn errors into warnings when listing all domains.Richard Jones2009-11-171-1/+2
| | | | | | This is a partial fix for RHBZ#538041. When listing all domains, don't die just because one domain fails, but keep trying for the rest.
* Move virt tools (virt-cat, virt-edit etc) into tools/ subdirectory.Richard Jones2009-10-191-0/+366
This moves the tool programs into a single directory: cat/* -> tools/virt-cat df/* -> tools/virt-df edit/* -> tools/virt-edit rescue/* -> tools/virt-rescue This in itself simplifies the build process because we only need one Makefile and one copy of 'run-locally'. 'run-*-locally' has become just 'run-locally' and takes an extra parameter which is the name of the tool, eg: run-locally cat [virt-cat params...] virt-inspector stays in its own directory, because this contains more than just a single Perl script.