tanks for your help Weiyang it can be useful for me
On Fri, Apr 4, 2014 at 9:07 PM, Weiyang Mo <moweiyang1...@gmail.com> wrote: > 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.taje...@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 >> > > -- Best Regards Farshad Tajedin