Dear Watanabe and all RYU members,

Our team is evaluating the necessary function that a SDN controller should 
include.

now, we doubt whether the xflow (sflow and netflow) should be inclueded or not.

because our team is very small, and all members are newers for RYU, so we think 
we should foucs our effort to the most important parts of the SDN controller.

Can you help us to figure out the most important part that we should focus and 
the xflow's priority in the whole SDN controller?

thank you very much.

best regards,

Dongliang 




[email protected]

From: watanabe.fumitaka
Date: 2013-07-25 09:30
To: [email protected]
CC: ryu-devel
Subject: [***SPAM*** Score/Req: 07.50/5.0] Re: [Ryu-devel] sflow
Hi,

This is a sample driver of sflow parser.
Please use as follows.

  $ ryu-manager sFlow_collector.py



sFlow_collector.py
------------------------------------

import gflags
import socket

from ryu.base import app_manager
from ryu.lib import hub
from ryu.lib.xflow import sflow


FLAGS = gflags.FLAGS
gflags.DEFINE_string('sflow_listen_host', '', 'sflow listen host')
gflags.DEFINE_integer('sflow_listen_port', 6343, 'sflow listen port')

BUFSIZE = 65535


class sFlowCollector(app_manager.RyuApp):
     def __init__(self):
         super(sFlowCollector, self).__init__()
         self.is_active = True
         self._start_recv()

     def close(self):
         self.is_active = False
         hub.joinall([self.thread])

     def _start_recv(self):
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
         self.sock.bind((FLAGS.sflow_listen_host, FLAGS.sflow_listen_port))
         self.thread = hub.spawn(self._recv_loop)

     def _recv_loop(self):
         self.logger.info('== sflow recv_loop start. ==')
         while self.is_active:
             (data, addrport) = self.sock.recvfrom(BUFSIZE)
             msg = sflow.sFlow.parser(data)
             if msg:
                 # debug print
                 self.logger.info(msg.__dict__)

------------------------------------


thanks.


(2013年07月24日 17:37), [email protected] wrote:
> Dear Sir or Madam,
> i am a newer for ryu.
> i want to use sflw, but i don not know how to use sflow function in ryu.
> In the ryu source code i only find a sflow.py file which implement the parse 
> function of sflow datapacket.
> pls tell me how to use the sflow function in RYU project.
> thanks a lot.
> dongliang
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> [email protected]
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to