On Fri, May 21, 2010 at 09:40:18PM -0500, Neil Aggarwal wrote:
When I run virt-top, it shows me the CPU and memory
usage of the VMs, but the disk and network colums
are empty.
I found this page:
http://people.redhat.com/~rjones/virt-top/faq.html
That states it depends on what is supported by
libvirt and the hypervisor.
Basically you need to look at whether the stats are available in
libvirt. For example on my (Fedora) host:
# virsh domifstat F13x64 vnet0
vnet0 rx_bytes 30105725
vnet0 rx_packets 31983
vnet0 rx_errs 0
vnet0 rx_drop 0
vnet0 tx_bytes 1252853
vnet0 tx_packets 13921
vnet0 tx_errs 0
vnet0 tx_drop 0
# virsh domblkstat F13x64 hda
hda rd_req 13545
hda rd_bytes 341982208
hda wr_req 9968
hda wr_bytes 206386176
I also tried this on a CentOS 5.4 machine, and I think there is a bug
in libvirt because I get some strangely inconsistent results from
these commands (as in, sometimes they run and sometimes they fail,
randomly AFAICT).
It's quite possible that the version of libvirt in RHEL 5 doesn't
fully support these stats, and I'm pretty sure we don't test network
and block stats (since we never provided or supported virt-top in RHEL
5, so we don't need it to). RHEL 6 will ship with a fully supported
virt-top command.
Followups set to virt-tools-list.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html