[pox-dev] working with links

Weiyang Mo moweiyang1988 at gmail.com
Fri Apr 4 09:37:07 PDT 2014


Hi,

You may send a request to the port s1,s2  for port status  and check the
total tx,rx bytes. To know the usage, you can compare two different values
at two different time.

Following is the simple code to retrieve bytes on the port.

def request_PortStats ():

core.openflow.getConnection(yourdpid).send(of.ofp_stats_request(body=of.ofp_port_stats_request())

def _handle_PortStatsReceived(event):
    for item in event.stats:
        if  item.port_no == s1:
            txbytes = item.tx_bytes
            rxbytes = item.rx_bytes
        if  item.port_no == s2:
            //do something

Hope it helps

Weiyang


2014-04-04 2:11 GMT-07:00 farshad tajedin <farshad.tajedin at gmail.com>:

> hi all
> i want to get some information from links that exist in my topology
> (implemented by mininet ) for example link utilization  for link
> between s1 and s2 or traffic rate between s1 and s2.
> can any body help me?
>
> --
> Best Regards
>
> Farshad Tajedin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20140404/9759e85a/attachment-0002.htm>


More information about the pox-dev mailing list