<div dir="ltr">Hi,<div style><br></div><div style>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. </div>
<div style><br></div><div style>Following is the simple code to retrieve bytes on the port.</div><div style><br></div><div>def request_PortStats ():</div><div style>    core.openflow.getConnection(yourdpid).send(of.ofp_stats_request(body=of.ofp_port_stats_request())</div>
<div style><br></div><div style>def _handle_PortStatsReceived(event):<br></div><div style>    for item in event.stats:</div><div style>        if  item.port_no == s1:</div><div style>            txbytes = item.tx_bytes </div>
<div>            rxbytes = item.rx_bytes </div><div>        if  item.port_no == s2:</div><div style>            //do something</div><div style><br></div><div style>Hope it helps</div><div style><br></div><div style>Weiyang</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-04 2:11 GMT-07:00 farshad tajedin <span dir="ltr"><<a href="mailto:farshad.tajedin@gmail.com" target="_blank">farshad.tajedin@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi all<br>
i want to get some information from links that exist in my topology<br>
(implemented by mininet ) for example link utilization  for link<br>
between s1 and s2 or traffic rate between s1 and s2.<br>
can any body help me?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best Regards<br>
<br>
Farshad Tajedin<br>
</font></span></blockquote></div><br></div>