C
HAPTER
23
| Flow Sampling Commands
– 806 –
sflow sampling
instance
This command enables an sFlow data source instance for a specific
interface that takes samples periodically based on the number of packets
processed. Use the no form to remove the sampling data source instance
from the switch’s sFlow configuration.
SYNTAX
sflow sampling {interface interface} instance instance-id
receiver owner-name sampling-rate sample-rate
[max-header-size max-header-size]
no sflow sample {interface interface} instance instance-id
interface - The source from which the samples will be taken and
sent to a collector.
ethernet unit/port
unit - Stack unit. (Range: 1)
port - Port number. (Range: 1-28)
instance-id - An instance ID used to identify the sampling source.
(Range: 1)
owner-name - The associated receiver, to which the samples will be
sent. (Range: 1-30 alphanumeric characters)
sample-rate - The packet sampling rate, or the number of packets
out of which one sample will be taken. (Range: 256-16777215
packets)
max-header-size - The maximum size of the sFlow datagram
header. (Range: 64 to 256 bytes)
DEFAULT SETTING
No sFlow sampling instance id configured.
Maximum Header Size: 128 bytes
COMMAND MODE
Privileged Exec
EXAMPLE
This example enables a sampling data source on Ethernet interface 1/1, an
associated receiver named “owner1”, and a sampling rate of one out of
100. The maximum header size is also set to 200 bytes.
Console# sflow sampling interface ethernet 1/1 instance 1 receiver owner1
sampling-rate 100 max-header-size 200
Console#
The following command removes a sampling data source from Ethernet
interface 1/1.
Console# no sflow sampling interface ethernet 1/1 instance 1
Console#