On Dec 18, 2011, at 11:52 AM, Walid van Boetzelaer wrote: > Openflow does maintain counters for each flow table, and these counters have > the number of received packets per port, etc... How can I retrieve these?
At the OpenFlow level, you do this by sending an ofp_port_stats_request asking for stats of type OFPST_PORT. You'll get back a response of ofp_port_stats which contains byte and packet counters for the port. The easiest way to do this from Python in NOX is using component's register_for_port_stats_in() to set a callback for port stats messages, and then using pycontext's send_port_stats_request() to send an actual request. (From inside your component, I think these are self.register_for_port_stats_in() and self.ctxt.send_port_stats_request().) Alternatively, the switchstats or monitoring components may do what you need. Hope that helps. -- Murphy _______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev