WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] VIF_metrics = 0

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] VIF_metrics = 0
From: Stefan de Konink <skinkie@xxxxxxxxx>
Date: Sat, 17 Nov 2007 03:05:08 +0100
Delivery-date: Fri, 16 Nov 2007 18:05:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20070911)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,


I use the following code snippet based on xapi.py to request the metrics
of the DomU's.

> def request_vif_metrics():
>         server, session = connect()
>         vm_uuids = execute(server, 'VM.get_all', (session,))
> 
>         for uuid in vm_uuids:
>                 vm_info = execute(server, 'VM.get_record', (session, uuid))
>                 vifs = vm_info['VIFs']
>                 read = 0.0;
>                 write = 0.0;
>                 for vif in vifs:
>                         vif_metrics = execute(server, 'VIF.get_metrics', 
> (session, vif))
>                         vif_metrics_struct = execute(server, 
> 'VIF_metrics.get_record', (session, vif_metrics))
>                         print vif_metrics_struct
>                         read += vif_metrics_struct['io_read_kbs']
>                         write += vif_metrics_struct['io_write_kbs']
>                 print '%s: %f %f' % (vm_info['name_label'], read, write)


I would expect to get some numbers higher than 0.0 from the
vif_metrics_struct.


The actual output:

Domain-0: 0.000000 0.000000
{'io_read_kbs': 0.0, 'last_updated': <DateTime '20071117T03:01:10' at
808e60>, 'io_write_kbs': 0.0}
skinkie_gentoo_old: 0.000000 0.000000
{'io_read_kbs': 0.0, 'last_updated': <DateTime '20071117T03:01:10' at
808908>, 'io_write_kbs': 0.0}
gameserver01: 0.000000 0.000000


I'm running Xen-tools 3.1.1, am I running an older version, or is this a
bug?



Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPkxUYH1+F2Rqwn0RCjPSAJ479OCLZG+BUUI1c9jYl34roerpmwCeIuhc
uGeBRULLsd3pWuOtynnapZI=
=vBew
-----END PGP SIGNATURE-----

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>