mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
Wed Aug 29 14:43:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_internal.c (xenHypervisorDomainInterfaceStats): Swap TX & RX network stats so they appear correct from the point of view of the domain.
This commit is contained in:
parent
b4d74032b0
commit
b001650c7d
@ -1,3 +1,9 @@
|
|||||||
|
Wed Aug 29 14:43:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
|
* src/xen_internal.c (xenHypervisorDomainInterfaceStats): Swap
|
||||||
|
TX & RX network stats so they appear correct from the point
|
||||||
|
of view of the domain.
|
||||||
|
|
||||||
Wed Aug 29 09:46:17 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
Wed Aug 29 09:46:17 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/virsh.c: apply patch from Masayuki Sunou to fix the exit value
|
* src/virsh.c: apply patch from Masayuki Sunou to fix the exit value
|
||||||
|
@ -1424,11 +1424,17 @@ xenHypervisorDomainInterfaceStats (virDomainPtr dom,
|
|||||||
long long tx_errs;
|
long long tx_errs;
|
||||||
long long tx_drop;
|
long long tx_drop;
|
||||||
|
|
||||||
|
/* IMPORTANT NOTE!
|
||||||
|
* /proc/net/dev vif<domid>.nn sees the network from the point
|
||||||
|
* of view of dom0 / hypervisor. So bytes TRANSMITTED by dom0
|
||||||
|
* are bytes RECEIVED by the domain. That's why the TX/RX fields
|
||||||
|
* appear to be swapped here.
|
||||||
|
*/
|
||||||
if (sscanf (line, "vif%d.%d: %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld",
|
if (sscanf (line, "vif%d.%d: %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld",
|
||||||
&domid, &port,
|
&domid, &port,
|
||||||
&rx_bytes, &rx_packets, &rx_errs, &rx_drop,
|
|
||||||
&dummy, &dummy, &dummy, &dummy,
|
|
||||||
&tx_bytes, &tx_packets, &tx_errs, &tx_drop,
|
&tx_bytes, &tx_packets, &tx_errs, &tx_drop,
|
||||||
|
&dummy, &dummy, &dummy, &dummy,
|
||||||
|
&rx_bytes, &rx_packets, &rx_errs, &rx_drop,
|
||||||
&dummy, &dummy, &dummy, &dummy) != 18)
|
&dummy, &dummy, &dummy, &dummy) != 18)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user