[pox-dev] Getting flow statistics from a switch on controller

Murphy McCauley murphy.mccauley at gmail.com
Sun Dec 1 22:14:09 PST 2013


I'm not aware of a way to do quite what you describe.  Port stats include drops and errors, but there's no way to tell what type of packets (TCP, UDP, etc.) were involved... the port doesn't care, after all.  Flow stats include byte and packet counters, but not drops and errors.

If you're willing to ignore drops and errors, I think you can pretty much do what you want.  For each class of flows you're interested in, install a table entry.  For example, if you're interested in TCP flows from port 4, install an entry which matches that, and then query that flow's statistics.  Doing more complex statistics (e.g., independent TX and RX counters) can probably be accomplished on Open vSwitch by using multiple tables (e.g., one table for RX and another for TX).  Alternatively, you could install narrow flows (i.e., exact matches), and sum the results in the controller yourself.


Hope that helps.

-- Murphy

On Dec 1, 2013, at 9:37 PM, Sadia Bashir <11msccssbashir at seecs.edu.pk> wrote:

> Thank you so much for your guide Murphy. Yeah the  "Example - Web Flow Statistics" helped me to count flows but port statistics is still not getting cleared up. I want to get count values for rx_packets, rx_dropped, rx_errors etc individually from a specific port based on packet type such as tcp, udp, ip, arp, icmp, source/destination IP/MAC addresses etc. 
> 
> I looked into flow_stats.py example here https://github.com/hip2b2/poxstuff/blob/master/flow_stats.py and checked out some previous posts regarding getting port statistics but couldn't get what I am looking for .
> Please tell me if there is a way possible to get port statistics based on a certain condition as I described above. 
> 
> Thank you for any hints/help. 
> 
> Kind Regards;
> 
> 
> 
> 
> 
> On Fri, Nov 29, 2013 at 9:47 AM, Murphy McCauley <murphy.mccauley at gmail.com> wrote:
> A good starting point might be "Example - Web Flow Statistics" in the POX manual.
> 
> As far as uniquely identifying a flow, the original idea was to use the match itself (since it certainly should identify the flow).  There's also a flow "cookie".  In OpenFlow 1.0, this was only useful in very limited contexts, but has become more useful with Nicira extensions and higher versions of OpenFlow.
> 
> -- Murphy
> 
> On Nov 27, 2013, at 6:59 PM, Sadia Bashir <11msccssbashir at seecs.edu.pk> wrote:
> 
> > Hi everyone,
> >
> > I want controller to get flow statistics from a switch such as the count-value associated with each flow installed on a switch, how do I uniquely identify a flow and then retrieve associated statistics.
> >
> > I am using Dart branch for POX-Controller, which files should I look into in order to get an idea in this regard.
> >
> > Thank you for your help.
> > --
> > Sadia
> 
> 
> 
> -- 
> 
>  




More information about the pox-dev mailing list