In order to make the switch proactively send stats when a flow is expired,
you'd need to change code on the switch. Even then, the controller would
get an unsolicited stats_reply message and probably get confused.

Things need to be initiated on the controller side, so what you probably
want to do is listen to flow_removed messages, because that's what happens
"automatically" according to the OF spec, so that should be your trigger.
When you get them check that the "reason" the flow was removed was that is
expired/deleted, and then issue a stats_request, and get the reply, match
it to the stats request you sent, and process it however you want.

On Fri, May 11, 2012 at 5:38 PM, 左青云 <[email protected]> wrote:

> Hi
>     Recently I was using monitoring.py in NOX to get stats from switch.
> The NOX send a stats request in every 10 second. But I want the switch to
> automaticly send stats when a flow is expired or deleted. Can anybody know
> how to get this function in NOX.
>     Thank you!
>

Reply via email to