OcNOS-RON : System Management Guide : System Management Command Reference : sFlow Commands
sFlow Commands
This chapter describes the Sampled Flow (sFlow) commands.
clear sflow statistics
Use this command to clear sFlow sampling-related counters such as the number of packets sampled and the number of counters sampled.
Command Syntax
clear sflow statistics (interface IFNAME|)
Parameters
IFNAME
Interface name
Default
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear sflow statistics
debug sflow
Use this command to display sFlow debugging messages.
Command Syntax
debug sflow (all|agent|sampling|polling|)
Parameters
all
Debug all (agent,sampling,polling)
agent
Debug sFlow agent
sampling
Debug sFlow sampling
polling
Debug sFlow polling
Default
By default, debug command is disabled.
Command Mode
Exec mode and Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#debug sflow all
#debug sflow agent
 
#configure terminal
(config)#debug sflow agent
feature sflow
Use this command to enable the sFlow feature.
Use the no form to disable the sFlow feature.
Command Syntax
feature sflow
no feature sflow
Parameters
None
Default
By default, sFlow feature is disabled.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
(config)#feature sflow
sflow agent-ip
Use this command to set the agent IP address for receivers.
Use the no form of this or remove an agent IP address.
Command Syntax
sflow agent-ip A.B.C.D
no sflow agent-ip
Parameter
A.B.C.D
IPv4 address
Default
The default IP address is zero (0).
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#sflow agent-ip 10.0.0.12
sflow collector
Use this command to configure the collector details such as the collector IPv4 address, port number, receiver time-out and datagram size.
Use the no form of this command to disable the sFlow collector.
Command Syntax
sflow collector A.B.C.D port <1024-65535> receiver-time-out <0-2147483647> max-datagram-size <200-9000>
no sflow collector (A.B.C.D port <1024-65535>|)
Parameter
A.B.C.D
Collector IPv4 address. This address must be reachable via the management VRF.
<1024-65535>
Collector UDP Port number. The standard sFlow UDP port: 6343
<0-2147483647>
Receiver time out value in seconds. Zero means no timeout. Upon timeout, value collector information is removed, stopping any ongoing sampling.
<200-9000>
Maximum datagram size in bytes that can be sent to the collector
Default
By default, the sFlow collector is disabled. The default port number is 6343.
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#sflow collector 2.2.2.2 port 1111 receiver time-out 30 max-datagram-size 500
 
(config)#no sflow collector
 
sflow enable
Use this command to enable or disable sampling on an interface after giving the sflow sampling-rate command on the same interface.
Command Syntax
sflow enable
no sflow enable
Default
By default, sFlow sampling is disabled.
Parameters
None
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
(config)#interface xe1
(config-if)#sflow sampling-rate 1024 direction ingress max-datagram-size 200
(config-if)#sflow enable
(config-if)#no sflow enable
sflow poll-interval
Use this command to configure the sFlow counter polling interval. Any change in the polling interval restarts ongoing polling of existing data source interfaces, if any.
Use the no form of this command to disable the sFlow counter polling interval.
Command Syntax
sflow poll-interval <5-60>
no sflow poll-interval
Parameters
<5-60>
Interface counter. Polling interval in seconds
Default
By default, sFlow counter polling interval is disabled.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface xe1
(config-if)#sflow poll-interval 25
(config-if)#no sflow poll-interval
 
 
sflow rate-limit
Use this command to set the CPU rate limit in packets per second.
Use the no form of this command to set the CPU rate limit to its default (0).
Command Syntax
sflow rate-limit <2000-100000>
no sflow rate-limit
Parameters
<2000-100000>
Rate limit in packets per second
Default
The default rate limit is zero (0).
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
This command is not available on Qumran platforms.
Examples
#configure terminal
(config)#sflow rate-limit 5000
sflow sampling-rate
Use this command to set the sampling rate on an interface. Any change in the sampling rate restarts the ongoing sampling of existing data-source interfaces, if any.
Use the no form of this command to disable the sFlow sampling rate.
Note: Packets to CPU is rate limited. In case of unknown unicast, rate limit is applied to such packets as well as sampled data packets.
Command Syntax
sflow sampling-rate <1024-16777215> direction (ingress | egress) max-header-size <128-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
<128-256>
Maximum header size in bytes
Default
By default, sFlow sampling rate is disabled.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#interface xe1
(config-if)#sflow sampling-rate 1024 direction ingress max-header-size 200
(config-if)#no sflow sampling-rate direction ingress
 
 
show sflow
Use this command to display sFlow agent configuration along with statistics for all interfaces.
Command Syntax
show sflow (brief | detail)
Parameters
brief
Display configuration parameters on interfaces along with sampling rate and poll interval.
detail
Same as brief along with configured and default attributes and values of sFlow agent, sFlow collector, and sampling information.
Default
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show sflow
sFlow Feature: Enabled
sFlow Version: 5
sFlow Global Information :
Agent IP: 10.12.16.38
Collector IP: 2.2.2.2 Port: 6343
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
 
sFlow Port Detailed Information:
Interface Packet-Sampling Packet-Sampling Counter-Polling Maximum Header
Rate Count Interval Count Size(bytes)
Ingress Egress Ingress Egress (sec) Ingress Egress
--------- ----------------------- ----------------------- ----------------------- --------------------
xe1 1024 0 0 0 6 3 128 0
 
#
#show sflow brief
sFlow Feature: Enabled
Collector IP: 2.2.2.2 Port: 6343
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
 
sFlow Port Configuration:
Interface Status Sample Rate Counter-Polling
Ingress Egress Ingress Egress Interval(sec)
--------- ------------------ ------------------------ ---------------
xe1 Enabled Disabled 1024 0 6
 
Table 28-79: Show sflow output 
Entry
Description
sFlow feature
Shows whether sFlow is enabled or disabled.
sFlow Version
Displays the sFlow version. Version 5 is the current global standard.
sFlow Global Information
Global Information consists of the Agent IP address, Collector IP, Port number, Maximum Datagram Size, and the Receiver timeout.
Agent IP
IPv4 address of this switch/router.
Collector IP
IPv4 address of the sFlow collector server.
Port
Port number on the sFlow collector server. Standard is port 6343.
Maximum Datagram Size
The maximum size of the datagrams sent by the agent
Receiver timeout
The number of seconds between each sampling – zero means sample continuously.
sFlow Port Interface
The interface of this switch/router on which sFlow is running (e.g. xe1/1).
Packet-Sampling Rate
the number of packets received or transmitted before a sample is taken.
Packet-Sampling Count
The number of sample packets that have been sampled on both the ingress and egress of the interface.
Counter-Polling
Shows the amount of time between polling samples and the count of the total number of polling samples taken.
Maximum Header Size
The maximum header size for both the ingress and egress of the interface.
show sflow interface
Use this command to display the sFlow configuration for the input interface.
Command Syntax
show sflow interface IFNAME
Parameters
IFNAME
Interface name
Default
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
Note: For information on the output values of this command, see the show sflow command.
#show sflow interface xe1
sFlow feature: Enabled
sFlow Version: 5
sFlow Global Information :
Agent IP: 10.10.26.104
Collector IP: 2.2.2.2 Port: 6343
Maximum Datagram Size(bytes): 200
Receiver timeout(sec) : 0
 
sFlow Port Detailed Information:
Interface Packet-Sampling Counter-Polling Maximum Header
Rate Count Interval(sec) Count Size(bytes)
--------- ----------------------- ------------------------ --------------
xe1 1024 0 6 41 128
show sflow statistics
Use this command to display sFlow counter information.
Command Syntax
show sflow statistics (interface IFNAME|)
Parameters
IFNAME
Interface name.
Default
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
Note: For information on the output values of this command, see the show sflow command.
#show sflow statistics
 
sFlow Port Statistics:
Interface Packet-Sampling Counter-Polling
Count Count
--------- --------------- ---------------
xe1 0 19