[pve-devel] [PATCH 3/3] add downtime && expected_downtime query-migrate info

Alexandre Derumier aderumier at odiso.com
Thu Dec 27 09:18:16 CET 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuMigrate.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 282cbc5..38f1d05 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -402,7 +402,8 @@ sub phase2 {
 		my $delay = time() - $start;
 		if ($delay > 0) {
 		    my $mbps = sprintf "%.2f", $conf->{memory}/$delay;
-		    $self->log('info', "migration speed: $mbps MB/s");
+		    my $downtime = $stat->{downtime} || 0;
+		    $self->log('info', "migration speed: $mbps MB/s - downtime $downtime ms");
 		}
 	    }
 
@@ -424,11 +425,12 @@ sub phase2 {
 		my $xbzrlepages = $stat->{"xbzrle-cache"}->{"pages"} || 0;
 		my $xbzrlecachemiss = $stat->{"xbzrle-cache"}->{"cache-miss"} || 0;
 		my $xbzrleoverflow = $stat->{"xbzrle-cache"}->{"overflow"} || 0;
+		my $expected_downtime = $stat->{"expected-downtime"} || 0;
 		#reduce sleep if remainig memory if lower than the everage transfert 
 		$usleep = 300000 if $avglstat && $rem < $avglstat;
 
 		$self->log('info', "migration status: $stat->{status} (transferred ${trans}, " .
-			   "remaining ${rem}), total ${total})");
+			   "remaining ${rem}), total ${total}) , expected downtime ${expected_downtime}");
 
 		#$self->log('info', "migration xbzrle cachesize: ${xbzrlecachesize} transferred ${xbzrlebytes} pages ${xbzrlepages} cachemiss ${xbzrlecachemiss} overflow ${xbzrleoverflow}");
 	    }
-- 
1.7.10.4




More information about the pve-devel mailing list