]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh-domain-monitor: add human readable output for 'domblkinfo'.
authorJulio Faracco <jcfaracco@gmail.com>
Mon, 1 May 2017 22:35:55 +0000 (19:35 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 2 May 2017 07:36:31 +0000 (09:36 +0200)
commit4b9af8625a642339526b47eff718fab12c4b7cea
tree1853b6e2e6b03df3a1f6cf2bf98293f2079cfa03
parent2fdfe0c98e6bfe0162e5956f71509da69ad9a9f2
virsh-domain-monitor: add human readable output for 'domblkinfo'.

https://bugzilla.redhat.com/show_bug.cgi?id=1330940

The virsh command 'domblkinfo' returns the capacity, allocation and phisycal
size of the devices attached in a domain. Usually, this sizes are very big
and hard to understand and calculate. This commits introduce a human readable
support to check the size of each field easilly.

For example, the command before:

virsh # domblkinfo my_domain hda
Capacity:       21474836480
Allocation:     14875545600
Physical:       21474836480

and after this patch:

virsh # domblkinfo my_domain hda --human
Capacity:       20.000G
Allocation:     13.900G
Physical:       20.000G

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-domain-monitor.c
tools/virsh.pod