[pox-dev] Requesting port statistics (problem with connection)

Murphy McCauley murphy.mccauley at gmail.com
Fri Oct 5 13:34:01 PDT 2012


On Oct 5, 2012, at 12:38 PM, Tmusic wrote:
> Port stats seem to be trickier...
> I found this thread on the list: "How can POX get packet counts (or beta transferred) from a switch within a timeline."
> With the command Murphy suggested [of.ofp_stats_request(body=of.ofp_port_stats_request(port_no = of.OFPP_NONE))] to work around the problem with port_no, I get following error:
...
> Changing port_no directly in the ofp_port_stats_request gives the same result.
> I have to add that I'm still using the stable branch.

You have to also set type = of.OFPST_PORT or whatever, as per the OpenFlow spec.  In betta this happens automatically.

> Betta (0ca0a8b5b5726195aa2c69337af98a146308dab9) always gives following error (no matter which components are loaded):
...
>   File "/home/openflow/temp_repo/poxrefbetta/pox/openflow/libopenflow_01.py", line 51, in xid_generator
>     return chain.from_iterable(repeat(xrange(start,stop+1))).next
> OverflowError: Python int too large to convert to C long

Oh, weird.  I guess you're running a 32 bit Python?  Try knocking the +1 off the second arg to xrange and seeing if that fixes it.

-- Murphy


More information about the pox-dev mailing list