Dan Kenigsberg has uploaded a new change for review.
Change subject: vm iface statistics: never report negative rates ......................................................................
vm iface statistics: never report negative rates
When Linux tx/rx couters overflow their 32 bit limit, they wrap back to zero. This causes our reported rxRate/txRate to become negative for one nample. 51073875161d9b932b7
Change-Id: I40daeb12172a7f54f135b3018405ef228983fa93 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M vdsm/vm.py 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/23598/1
diff --git a/vdsm/vm.py b/vdsm/vm.py index 7c2d496..c40a78d 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -609,10 +609,12 @@ ifStats['txDropped'] = str(eInfo[nic.name][7])
ifRxBytes = (100.0 * - (eInfo[nic.name][0] - sInfo[nic.name][0]) / + (eInfo[nic.name][0] - sInfo[nic.name][0]) % + 2 ** 32 / sampleInterval / ifSpeed / self.MBPS_TO_BPS) ifTxBytes = (100.0 * - (eInfo[nic.name][4] - sInfo[nic.name][4]) / + (eInfo[nic.name][4] - sInfo[nic.name][4]) % + 2 ** 32 / sampleInterval / ifSpeed / self.MBPS_TO_BPS)
ifStats['rxRate'] = '%.1f' % ifRxBytes
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6032/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6820/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/6926/ : SUCCESS
Ondřej Svoboda has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1: Verified+1 Code-Review+1
The rates looked OK when watching getAllVmStats while installing a new system in a VM.
Ondřej Svoboda has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1: -Code-Review
Dan Kenigsberg has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vm iface statistics: never report negative rates ......................................................................
vm iface statistics: never report negative rates
When Linux tx/rx couters overflow their 32 bit limit, they wrap back to zero. This causes our reported rxRate/txRate to become negative for one nample. 51073875161d9b932b7
Change-Id: I40daeb12172a7f54f135b3018405ef228983fa93 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/23598 Tested-by: Ondřej Svoboda osvoboda@redhat.com --- M vdsm/vm.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Ondřej Svoboda: Verified Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org