The sflow counter-sampling interval command sets the counter sampling interval on an interface.
The undo sflow counter-sampling interval command restores the default counter sampling interval on an interface.
By default, the counter sampling interval on an interface is 10s.
Parameter |
Description |
Value |
---|---|---|
interval interval |
Specifies the counter sampling interval. |
The value is an integer that ranges from 2 to 3600, in seconds. The default value is 10. |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, port group view
Usage scenario
Counter sampling is based on time. An sFlow agent periodically obtains traffic statistics on an interface, encapsulates the traffic statistics into sFlow packets, and sends them to an sFlow collector. You can run the sflow counter-sampling interval command to set an appropriate counter sampling interval.
Precautions
The sflow flow-sampling rate command only applies to Layer 2 physical interfaces, but does not apply to Eth-Trunk or Layer 3 interfaces. However, this command takes effect on the Layer 3 interface which is switched from a Layer 2 interface using the undo portswitch command, and can take effect on Eth-Trunk member interfaces. If you run the sflow flow-sampling rate command multiple times, only the latest configuration takes effect.
# Set the counter sampling interval to 100s.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] sflow counter-sampling interval 100
# Configure a port group pg1 that has member ports GE0/0/2 and GE0/0/3, and set the counter sampling interval to 100s for the port group pg1.
[HUAWEI] port-group pg1 [HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/2 [HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/3 [HUAWEI-port-group-pg1] sflow counter-sampling interval 100