[Openstack] bw_uasge counters

Day, Phil philip.day at hp.com
Wed Jul 11 16:18:06 UTC 2012


Hi All,

I'm looking at the network bandwidth code with a view to how the current framework could be made to work with libvirt, and a I have a couple of questions that hopefully someone familiar with the Xen implementation can answer:


-          Do the Xen counters get reset after they are read, or are the values always cumulative ?   (I'm guessing the latter as they seem to be just overwritten by the periodic task).



-          It looks as if the table is intended to provide a set of values per instance_uuid/mac combination (presumably to have counters per NIC), but the code which updates the entries looks like it always just updates the first entry it finds for a particular uuid:

        bwusage = model_query(context, models.BandwidthUsage,
                              session=session, read_deleted="yes").\
                              filter_by(start_period=start_period).\
                              filter_by(uuid=uuid).\
                             first()

        if not bwusage:
            ...

Thanks,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120711/cfe64f9e/attachment.html>


More information about the Openstack mailing list