Change in vdsm[master]: migration: added logging of more detailed stats

tjelinek at redhat.com tjelinek at redhat.com
Mon Apr 11 14:30:22 UTC 2016


Tomas Jelinek has uploaded a new change for review.

Change subject: migration: added logging of more detailed stats
......................................................................

migration: added logging of more detailed stats

The VIR_DOMAIN_JOB_MEMORY_BPS, VIR_DOMAIN_JOB_MEMORY_CONSTANT and
VIR_DOMAIN_JOB_COMPRESSION_BYTES will be logged to help understand the details
of the migrations.

Change-Id: Ib0b81c77b62e52190bfb9fe857105389d75d11e4
Bug-Url: https://bugzilla.redhat.com/1252426
Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/55976/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index d2dd1c2..c235b7e 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -581,6 +581,7 @@
             # from libvirt sources: data* = file* + mem*.
             # docs can be misleading due to misaligned lines.
             now = time.time()
+            self.log_migration_stats()
             if not self._use_conv_schedule and\
                     (0 < migrationMaxTime < now - self._startTime):
                 self._vm.log.warn('The migration took %d seconds which is '
@@ -645,3 +646,19 @@
             self._vm.log.warn('Aborting migration')
             self._vm._dom.abortJob()
             self.stop()
+
+    def log_migration_stats(self):
+        stats = self._vm._dom.jobStats()
+        if libvirt.VIR_DOMAIN_JOB_MEMORY_BPS in stats:
+            self._vm.log.debug('Migration copy rate: %ibps' %
+                               stats[libvirt.VIR_DOMAIN_JOB_MEMORY_BPS])
+
+        if libvirt.VIR_DOMAIN_JOB_MEMORY_CONSTANT in stats:
+            self._vm.log.debug('%i pages filled with a constant byte '
+                               'transferred since the beginning '
+                               'of the migration' %
+                               stats[libvirt.VIR_DOMAIN_JOB_MEMORY_CONSTANT])
+
+        if libvirt.VIR_DOMAIN_JOB_COMPRESSION_BYTES in stats:
+            self._vm.log.debug('%i compressed bytes transferred' %
+                               stats[libvirt.VIR_DOMAIN_JOB_COMPRESSION_BYTES])


-- 
To view, visit https://gerrit.ovirt.org/55976
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0b81c77b62e52190bfb9fe857105389d75d11e4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>


More information about the vdsm-patches mailing list