/
Configuring sFlow v5

Configuring sFlow v5


PicOS OVS supports sFlow v5. User can configure the sFlow as follows:

root@PicOS-OVS$ ovs-vsctl  --id=@s create sFlow agent=eth0 target=\"10.10.50.207:9901\" header=128 sampling=5000 polling=30 -- set Bridge br0 sflow=@s
root@PicOS-OVS$ 


In the above example, the parameters are as follows:

COLLECTOR_IP=10.10.50.207
COLLECTOR_PORT=9901
AGENT_IP=eth0
HEADER_BYTES=128
SAMPLING_N=5000
POLLING_SECS=30

 

List the configuration of sflow:

root@PicOS-OVS$ovs-vsctl list sflow
_uuid               : 88d94294-4bb3-44f3-8a12-6055bf458de6
agent               : "eth0"
external_ids        : {}
header              : 128
polling             : 30
sampling            : 5000
targets             : ["10.10.50.207:9901"]
root@PicOS-OVS$

 

To delete an sFlow, use the clear command, as shown in the following example.:

root@PicOS-OVS$ ovs-vsctl -- clear Bridge br0 sflow
root@PicOS-OVS$

Tips

1.collector ip is ipv4 address,0.0.0.0 and 255.255.255.255 are invalid collector ip;

2.sample-rate equals to 0,no counter sample and flow sample packets,different with l2/l3 system;

polling-interval equals to 0,no counter sample packets,only flow sample packets.

sample-rate and polling-interval both equal to 0,no couter sample and flow sample packets.

3.header-len and sample rate do not have any limitations in ovs,while in l2/l3 system,header-len is [14,...1350] and sample rate is 0 or bigger than 100.

4.only support random sample mode.

5.Sample rate is 1,has some problem Bug 7939

 

 

Copyright © 2025 Pica8 Inc. All Rights Reserved.