R3303-HP HSR6800 Routers Network Management and Monitoring Configuration Guide

109
Configuring sampler
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 to 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 sampling
decreases the impact on the forwarding capacity of the device.
For more information about NetStream, see "Configuring NetStream."
Creating a sampler
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Create a sampler.
sampler sampler-name mode
{ fixed | random }
packet-interval rate
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).
Displaying and maintaining a sampler
Task Command
Remarks
Display configuration and running
information for the sampler.
display sampler [ sampler-name ] [ slot
slot-number ] [ | { begin | exclude |
include } regular-expression ]
Available in any view.
Clear running information for the sampler.
reset sampler statistics
[ sampler-name ]
Available in user view.