sflow sampling-rate

Use this command to set the sampling rate on all interfaces that have command sflow enabled, but do not have sflow sampling-rate configured on interface level. This shall be overridden by the interface-specific configuration, see sflow sampling-rate configuration on interface level.

Any change in the sampling rate restarts the ongoing sampling of existing data-source interfaces, if any.

Use no parameter of this command to remove this configuration.

Use show sflow global to verify this configuration.

Command Syntax

Copy
sflow sampling-rate <1024-16777215> direction (ingress | egress) max-header-size <16-256>
no sflow sampling-rate direction (ingress | egress)

Parameters

<1024-16777215>

Sampling rate

direction

The direction of sampling an interface:

ingress

Ingress traffic

egress

Egress traffic

<16-256>

Maximum header size in bytes

Default

Disabled.

Command Mode

Configure mode

Applicability

This command was introduced before OcNOS version 1.3.

Examples

Copy
cNOS#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
OcNOS(config)#sflow poll-interval 60
OcNOS(config)#sflow sampling-rate 3000 direction ingress max-header-size 35
OcNOS(config)#sflow sampling-rate 2000 direction egress max-header-size 30
OcNOS(config)#
OcNOS(config)#interface eth1
OcNOS(config-if)#sflow enable
OcNOS(config-if)#exit
OcNOS(config)#commit
OcNOS#show sflow brief 
sFlow Feature: Enabled
sFlow Port Configuration:
Interface  Collector  Status               Sample Rate                Counter-Polling 
           ID         Ingress    Egress    Ingress      Egress        Interval(sec) 
---------  ---------  ------------------   ------------------------   ---------------
eth1               0  Enabled    Disabled         3000         2000     60