Re: [PATCH] Block device and network stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel P. Berrange wrote:
On Fri, Aug 10, 2007 at 03:35:08PM +0100, Richard W.M. Jones wrote:
This is the implementation (currently Xen, local only).

It includes a couple of virsh commands if you want to play with looking at the stats.

The network interface stuff isn't quiet correct

+/* Paths have the form "virbr\d+" or "xenbr\d+".  On Linux we open
+ * /proc/net/dev and look for the device called vif<domid>.<n>.
+ */
+int
+xenHypervisorDomainInterfaceStats (virDomainPtr dom,
+                                   const char *path,
+                                   struct _virDomainInterfaceStats *stats)


The virbrN  / xenbrN devices are bridges so see all traffic from any guest
attached.  We need to look at ths individual  vifN.N or vnetN devices which
are per-guest.  This info isn't included in the XML though. If we can figure
out a efficient way to export vif name in the XML we could use that, otherwie
the API should probably take the MAC address on the device and use that to
resolve the underlying VIF. The former is nicer though if we can do it.

Yuk, but yes I'll take a look.

That all said, it could be nice to also have a getStats method for the
virNetworkPtr objects to get cummulative bridge data - the backend impl
would be near identical.

Yup.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]