From: Stefan de Konink Subject: VIF_metrics = 0 Date: Sat, 17 Nov 2007 03:05:08 +0100 Message-ID: <473E4C54.3060107@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org -----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': , 'io_write_kbs': 0.0} skinkie_gentoo_old: 0.000000 0.000000 {'io_read_kbs': 0.0, 'last_updated': , '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-----