S Commands
sampler
364
Cisco Nexus 7000 Series NX-OS System Management Command Reference
OL-25806-03
sampler
To define a sampler and enter the sampler configuration mode, use the sampler command. To remove
the sampler definition, use the no form of this command.
sampler name
no sampler name
Syntax Description
Defaults No samplers are defined.
Command Modes Global configuration mode
Supported User Roles network-admin
vdc-admin
Command History
Usage Guidelines NetFlow sampling means that M out of N packets are sampled. When a packet is sampled and there is a
NetFlow cache miss, a NetFlow cache entry is created for this flow. The first packet timestamp is updated
and the statistics for the first packet are initialized (for example, the bytes are set to the number of bytes
in the packet and the packet count is set to one). If there is a NetFlow cache hit when the packet is
sampled, the cache for this flow is updated, which includes adding the number of bytes in the packet to
the byte counter and incrementing the packet count by one.
Once you enter the sampler name command, you enter the sampler configuration mode, and the prompt
changes to the following:
switch(config-flow-sampler)#
Within the sampler configuration mode, the following keywords and arguments are available to
configure the flow monitor:
• description description—Provides a description for this sampler; you can add a maximum of 63
characters.
• exit—Exits from the current configuration mode.
• mode sample-num out-of packets—Configures the sampler mode. The valid values are as follows:
–
sample-num—Number of samples per sampling. The range is from 1 to 64.
–
out-of—Specifies the samples per packet ratio.
–
packets—Number of packets in each sampling. The range is from 1 to 8192.
name Name of the sampler.
Release Modification
4.0(1) This command was introduced.