The sflow flow-sampling rate command configures a flow sampling rate on an interface.
The undo sflow flow-sampling rate command restores the default flow sampling rate on an interface.
By default, the sampling rate is 8192.
Parameter | Description | Value |
---|---|---|
rate rate |
Specifies a sampling rate in the format of 1/rate. rate specifies the number of packets out of which the interface will sample a packet. |
The value is an integer ranging from 1 to 65535. |
inbound |
Specifies to get inbound direction sampling packet. |
- |
outbound |
Specifies to get inbound direction sampling packet. |
- |
Usage Scenario
To configure a flow sampling rate on an interface, run the sflow flow-sampling rate command. Setting a large sampling rate reduces the system's load but distorts the sampled data more than when a small sampling rate is set.
Precautions
sFlow cannot be configured on a channelized sub-interface with network slicing configured.
<HUAWEI> system-view [*HUAWEI] sflow [~HUAWEI-sflow] sflow collector 1 [~HUAWEI-sflow-collector-1] quit [~HUAWEI-sflow] quit [~HUAWEI] interface GigabitEthernet0/1/1 [*HUAWEI-GigabitEthernet0/1/1] sflow flow-sampling collector 1 inbound [*HUAWEI-GigabitEthernet0/1/1] sflow flow-sampling rate 1000 inbound