[libvirt] [PATCH] migration: Usable time statistics without requiring NTP
Martin Kletzander
mkletzan at redhat.com
Mon Apr 27 07:31:30 UTC 2015
On Thu, Apr 23, 2015 at 11:18:08AM +0200, Jiri Denemark wrote:
>virDomainGetJobStats is able to report statistics of a completed
>migration, however to get usable downtime and total time statistics both
>hosts have to keep synchronized time. To provide at least some
>estimation of the times even when NTP daemons are not running on both
>hosts we can just ignore the time needed to transfer a migration cookie
>to the destination host. The result will be also inaccurate but a bit
>more predictable. The total/down time will just be at least what we
>report.
>
>https://bugzilla.redhat.com/show_bug.cgi?id=1213434
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
> include/libvirt/libvirt-domain.h | 23 ++++++++++++++++++++++-
> src/qemu/qemu_domain.c | 15 +++++++++++++++
> src/qemu/qemu_domain.h | 9 +++++++++
> src/qemu/qemu_migration.c | 26 +++++++++++++-------------
> tools/virsh-domain.c | 16 ++++++++++++++++
> 5 files changed, 75 insertions(+), 14 deletions(-)
>
>diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
>index 6bea7c7..1b93f7d 100644
>--- a/src/qemu/qemu_domain.h
>+++ b/src/qemu/qemu_domain.h
>@@ -100,9 +100,18 @@ struct _qemuDomainJobInfo {
> virDomainJobType type;
> unsigned long long started; /* When the async job started */
> unsigned long long stopped; /* When the domain's CPUs were stopped */
>+ unsigned long long sent; /* When the source sent status info to the
>+ destination (only for migrations). */
>+ unsigned long long received; /* When the destination host received status
>+ info from the source (migrations only). */
> /* Computed values */
> unsigned long long timeElapsed;
> unsigned long long timeRemaining;
>+ long long timeDelta; /* delta = sent - received, i.e., the difference
This should be recieved - sent.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150427/d75171ec/attachment-0001.sig>
More information about the libvir-list
mailing list