flow_stats.py
Sample output of switches list:
SWITCHES list: [123917682136617,
123917682136611,
123917682136604,
123917682136622]
Sample output of links list:
LINKS list: [ (123917682136617, 123917682136611, {'port': 2}),
(123917682136611, 123917682136617, {'port': 2}),
(123917682136611, 123917682136604, {'port': 3}),
(123917682136622, 123917682136604, {'port': 2}),
(123917682136604, 123917682136611, {'port': 1}),
(123917682136617, 123917682136622, {'port': 3}),
(123917682136604, 123917682136622, {'port': 2}),
(123917682136622, 123917682136617, {'port': 1})
]
TODO: To get the packet count for each flow the idea is to alter _flow_stats_reply_handler(self, ev), to _flow_stats_reply_handler(self, ev, source, destination)
Generating list of flows from the switch
switch IP switch MAC in-port eth-dst out-port packets bytes
---------------- ---------------- -------- ----------------- -------- -------- --------
192.168.0.50 000070b3d56cd629 1 38:c9:86:27:89:14 3 164 31844
192.168.0.50 000070b3d56cd629 3 78:2b:cb:83:f4:2d 1 221 88287
192.168.0.52 000070b3d56cd62e 1 38:c9:86:27:89:14 2 164 31844
192.168.0.52 000070b3d56cd62e 2 78:2b:cb:83:f4:2d 1 220 88047
192.168.0.53 000070b3d56cd61c 2 38:c9:86:27:89:14 3 165 32789
192.168.0.53 000070b3d56cd61c 3 78:2b:cb:83:f4:2d 2 220 88047