[Libvir] [PATCH] TX/RX network stats are swapped

Richard W.M. Jones rjones at redhat.com
Wed Aug 29 13:11:16 UTC 2007


I noticed that the stats reported by virDomainInterfaceStats appeared to 
be swapped around.  If the domain was downloading a lot of information, 
then tx_bytes would increase quickly (I'd expect rx_bytes to increase 
more if the domain was downloading).

The problem is that xen_internal.c measures the TX/RX from the point of 
view of dom0.  So that if dom0 is TRANSMITTING a lot of data up to the 
domain, then that domain is really RECEIVING it.

Yes, I feel like an idiot ...

Fix attached.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-rx-tx-swap.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070829/c4ead016/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070829/c4ead016/attachment-0003.bin>


More information about the libvir-list mailing list