[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] VIF_metrics = 0



-----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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.