[libvirt] How to get the host network stats

Hello there, I want to find how to get the host's network stats by using libvirt. I found one from PHP API reference which is called libvirt_domain_interface_stats, I'm guessing it's for guest since it's 'domain'. However, I'm not really sure. Looking forward to hear the answers from you guys. Thank you, Tracey

Hi, libvirt_domain_interface stats PHP API is calling virDomainInterfaceStats. For libvirt API please see http://www.libvirt.org/html/libvirt-libvirt.html#virDomainInterfaceStats Thanks, Michal On 07/02/2013 10:10 AM, Zhang, Yijing wrote:
Hello there,
I want to find how to get the host’s network stats by using libvirt. I found one from PHP API reference which is called libvirt_domain_interface_stats, I’m guessing it’s for guest since it’s ‘domain’. However, I’m not really sure.
Looking forward to hear the answers from you guys.
Thank you,
Tracey
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Michal Novotny <minovotn@redhat.com>, RHCE, Red Hat Virtualization | libvirt-php bindings | php-virt-control.org

On Tue, Jul 02, 2013 at 03:07:56PM +0200, Michal Novotny wrote:
Hi, libvirt_domain_interface stats PHP API is calling virDomainInterfaceStats.
That gives you the stats of the guest NICs, but not anything about the host's network stats. We don't have any API for the latter.
On 07/02/2013 10:10 AM, Zhang, Yijing wrote:
Hello there,
I want to find how to get the host’s network stats by using libvirt. I found one from PHP API reference which is called libvirt_domain_interface_stats, I’m guessing it’s for guest since it’s ‘domain’. However, I’m not really sure.
Looking forward to hear the answers from you guys.
Thank you,
Tracey
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Michal Novotny
-
Zhang, Yijing