Torrado36
Torrado36

Reputation: 177

Handle flow records in mininet-dashboard

I am trying to detect flow record in mininet-dashboard. Elephant.js file:

setFlow('pair',
{'keys':'inputifindex,ipsource,ipdestination','value':'bytes','log':'true','activeTimeout':'2'});

setThreshold('elephant',
 {'metric':'pair','value':1000000/8,'byFlow':true,'timeout':1});

setEventHandler(function(evt) {
 var [inputifindex,ipsource,ipdestination] = evt.flowKey.split(',');
 var {node,port} = topologyInterfaceToPort(evt.agent,inputifindex);
 logInfo(port + " " + ipsource + " " + ipdestination);
},['elephant']);

setFlowHandler(function(flow) {
  logInfo(JSON.stringify(flow));
});

But when I run iperf h1 h2, I do not get any info in console about flow. But I see this flow in mininet-dashboard app. How to properly get info about flow and log to console?

my topology:

sudo mn --custom extras/sflow.py --topo tree,depth=1,fanout=2 --controller remote --switch ovsk,protocols=OpenFlow13

Upvotes: 0

Views: 158

Answers (1)

Peter
Peter

Reputation: 36

How you are defining flows? You need to set log=true in the flow definition in order to generate flow records. Also, set an activeTimeout to limit the delay before you receive a flow record, or set flowStart=true if you want an immediate notification and don't care about flow counter values.

Upvotes: 1

Related Questions