Configuring samplers, Overview, Creating a sampler – H3C Technologies H3C MSR 50 User Manual

Page 168: Displaying and maintaining a sampler

Advertising
background image

Configuring samplers

Overview

A sampler samples packets. The sampler selects a packet from among sequential packets, and it sends

the packet to the service module for processing.
The following sampling modes are available:

Fixed mode—The first packet is selected from among sequential packets in each sampling.

Random mode—Any packet might be selected from among sequential packets in each sampling.

A sampler can be used to sample packets for NetStream. Only the sampled packets are sent and

processed by the traffic monitoring module. Sampling is useful if you have too much traffic and want to

limit how much traffic is to be analyzed. The sampled data is statistically accurate and decreases the

impact on the forwarding capacity of the device.
For more information about NetStream, see "Configuring NetStream."

Creating a sampler

Step Command

Remarks

403.

Enter system view.

system-view

N/A

The sampling rate is calculated by using the
formula 2 to the nth power, where n is the rate.

For example, if the rate is 8, each sampling
selects one packet from among 256 packets (2

to the 8th power); if the rate is 10, each

sampling selects one packet from among
1024 packets (2 to the 10th power).

sampler sampler-name mode
{ fixed | random }

packet-interval rate

404.

Create a sampler.

Displaying and maintaining a sampler

Task Command

Remarks

display sampler [ sampler-name ] [ |
{ begin | exclude | include }

regular-expression ]

Display configuration and running
information about the sampler.

Available in any view.

Clear running information about the
sampler.

reset sampler statistics
[ sampler-name ]

Available in user view.

155

Advertising