Thanks! I have another question.
Using the nox controller , I have inserted forwarding rules such that packets
that match a particular (src_mac, dst_mac) pair be sent out on a particular
port.
Since this is a wildcard entry, it also matches packets that belong to the null
vlan as long as the ( src_mac, dst_mac) pair matches.
However, when I request for aggregate flow stats from the nox controller, it
does not show any flows
00117|openflow-event|DBG:received stats reply from 00ffca7e3ad4
Aggregate stats in from datapath 00:ff:ca:7e:3a:d4
{'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}
This is how I am requesting for aggregate flow stats
def aggregate_timer(self, dpid):
flow = ofp_match()
flow.wildcards = 0xffff
self.ctxt.send_aggregate_stats_request(dpid, flow, 0xff)
self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dpid))
But running ovs-ofctl on the switch does show that there are flows in the
forwarding table.
Jan 02 11:25:34|00001|ofctl|INFO|connecting to
unix://var/run/openvswitch/ful0.mgmt
stats_reply (xid=0xe9c1a): flags=none type=2(aggregate)
packet_count=414 byte_count=42228 flow_count=2
I am not sure why sending a request from the nox controller does not give the
correct response. I don't know if that's a bug with the switch's implementation
or nox or I am doing something wrong while requesting for stats.
The following thread leads me to believe that I am missing something but I am
not sure what.
https://mailman.stanford.edu/pipermail/openflow-spec/2010-February/000890.html
Any thoughts ?
Thanks!
Malveeka
----- Original Message -----
From: "Kyriakos Zarifis" <[email protected]>
To: "Murphy McCauley" <[email protected]>
Cc: "Malveeka Tewari" <[email protected]>, [email protected]
Sent: Monday, February 21, 2011 1:10:42 PM GMT -08:00 US/Canada Pacific
Subject: Re: [nox-dev] Getting individual flow stats for an python app
Exactly - there's an example of using this in netapps/monitoring.py (line 188)
in destiny, (and you can trace how it's handled etc)
If all you need is to print out/look at the flow stats (rather than act on them
programatically), and you do switch to destiny, you could use the gui for that.
On Mon, Feb 21, 2011 at 8:44 AM, Murphy McCauley < [email protected] > wrote:
I believe that the flow stats event is Pythonized in both the zaku and destiny
branches -- it's just that a helper method to make the callback easy to
register is missing from zaku. A simple register_for_flow_stats_in method DOES
exist in the destiny branch, though. So I'd suggest you either switch to the
destiny branch, or look at the relevant patch to destiny
(21e3bf59aca5d3df8e86bcd09cc9156a66866f7f) which should demonstrate how to
register a callback for flow stats events (it's not particularly hard --
basically you call register_handler with Flow_stats_in_event.static_get_name()
as the first parameter).
Hope that helps.
-- Murphy
On Feb 21, 2011, at 8:30 AM, Malveeka Tewari wrote:
Hi
I am writing a python app for the NOX controller and want to obtain flow
statistics for individual flows from an openflow switch.
I can see that nox supports python callback handlers for handling stats reply
for aggregate flows stats, table stats , port stats and desc stats events, but
the handler for individual flow stat seems to be missing.
Any suggestions on how can I extend the functionality to handle flow stats
event in a python nox app.
Thanks!
Malveeka _______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org