R3303-HP HSR6800 Routers Network Management and Monitoring Command Reference
245
Syntax
sflow sampling-mode { determine | random }
undo sflow sampling-mode
Views
Interface view
Default command level
2: System level
Parameters
determine: Specifies the fixed sampling mode. For example, if the flow sampling rate is set to 4000 (by
using the sflow sampling-rate command), the device randomly samples a packet, like the tenth packet,
from the first 4000 packets. The next time the device samples the 4010th packet, and so on.
random: Specifies the random sampling mode. For example, if the packet sampling rate is set to 4000,
the device might sample one packet from the first 4000 packets, two from the next 4000 packets, and
none from the third 4000 packets, randomly. But generally the device samples one packet from 4000
packets on the average.
Usage guidelines
This command is supported on physical Ethernet interfaces only, instead of logical interfaces (Ethernet
subinterfaces and VLAN interfaces) and network management interfaces.
Examples
# Specify the fixed sample mode on GigabitEthernet 4/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 4/0/1
[Sysname-GigabitEthernet4/0/1] sflow sampling-mode determine
Related commands
sflow sampling-rate
sflow sampling-rate
Use sflow sampling-rate to specify the number of packets out of which flow sampling will sample a
packet on an interface.
Use undo sflow sampling-rate to disable sampling.
Syntax
sflow sampling-rate rate
undo sflow sampling-rate
Views
Interface view
Default command level
2: System level