Configuration example

Global configuration

device(config)# sflow enable 
2017/01/23-10:03:34, [SFLO-1001], 4337, DCE, INFO, switch, sFlow is enabled globally.
device(config)# no sflow enable 
2017/01/23-10:03:53, [SFLO-1001], 4338, DCE, INFO, switch, sFlow is disabled globally.
device(config)# sflow sample-rate 4096
2017/01/23-10:04:15, [SFLO-1003], 4339, DCE, INFO, switch, Global sFlow sampling rate is changed to 4096.
device(config)# no sflow sample-rate  
2017/01/23-10:04:45, [SFLO-1003], 4340, DCE, INFO, switch, Global sFlow sampling rate is changed to 2048.
device(config)# sflow polling-interval 30
2017/01/23-10:05:01, [SFLO-1004], 4341, DCE, INFO, switch, Global sFlow polling interval is changed to 30.
device(config)# no sflow polling-interval
2017/01/23-10:05:19, [SFLO-1004], 4342, DCE, INFO, switch, Global sFlow polling interval is changed to 20.
device(config)# sflow collector 172.22.108.57 6343
2017/01/23-10:06:00, [SFLO-1007], 4343, DCE, INFO, switch, 172.22.108.57 is configured as sFlow collector.
device(config)# sflow collector 10.1.15.2 6343 use-vrf default-vrf
2017/01/23-10:06:47, [SFLO-1007], 4344, DCE, INFO, switch, 10.1.15.2 is configured as sFlow collector.
device(config)# vrf red_vrf
device(config-vrf-red_vrf)# address-family ipv4 unicast
device(vrf-red_vrf-ipv4-unicast)# exit
device(config-vrf-red_vrf)# exit
device(config)# sflow collector 100.1.1.2 6343 use-vrf red_vrf
2017/01/23-10:08:42, [SFLO-1007], 4345, DCE, INFO, switch, 100.1.1.2 is configured as sFlow collector.
device(config)# do show sflow                                           
sFlow services are:                      disabled
Global default sampling rate:            2048 pkts
Global default counter polling interval: 20 secs 
Collector server address        Vrf-Name         Sflow datagrams sent
----------------------------------------------------------------------
10.1.15.2:6343                 default-vrf            0
100.1.1.2:6343                 red_vrf                0
172.22.108.57:6343             mgmt-vrf               0

device(config)# do show run sflow
sflow collector 10.1.15.2 6343 use-vrf default-vrf
sflow collector 100.1.1.2 6343 use-vrf red_vrf
sflow collector 172.22.108.57 6343 use-vrf mgmt-vrf
device(config)# no sflow collector 172.22.108.57
2017/01/23-10:12:38, [SFLO-1007], 4347, DCE, INFO, switch, 172.22.108.57 is unconfigured as sFlow collector.
device(config)# no sflow collector 10.1.15.2 6343 use-vrf default-vrf
2017/01/23-10:13:13, [SFLO-1007], 4348, DCE, INFO, switch, 10.1.15.2 is unconfigured as sFlow collector.
device(config)# no sflow collector 100.1.1.2 6343 use-vrf red_vrf
2017/01/23-10:13:54, [SFLO-1008], 4349, DCE, INFO, switch, All the sFlow collectors are unconfigured.
device(config)# 

Interface configuration

device(conf-if-eth-1/14)# sflow en

2015/12/02-02:49:13, [SFLO-1002], 73, M1 | Active | DCE, INFO, Device, sFlow is
enabled for port Ethernet 1/14. 

device(conf-if-eth-1/14)# no sflow enable
2015/12/02-03:28:09, [SFLO-1002], 90, M1 | Active | DCE, INFO, Device, sFlow is
disabled for port Ethernet 1/14.


device(conf-if-eth-1/14)# sflow sample-rate 8192

2015/12/02-03:13:26, [SFLO-1005], 86, M1 | Active | DCE, INFO, Device, sFlow sampling rate on port 
Ethernet 1/14 is changed to 8192.

device(conf-if-eth-1/14)# no sflow sample-rate

2015/12/02-03:26:39, [SFLO-1005], 88, M1 | Active | DCE, INFO, Device, sFlow sampling rate on port 
Ethernet 1/14 is changed to 4096.


device(conf-if-eth-1/14)# sflow polling-interval 40

2015/12/02-03:13:40, [SFLO-1006], 87, M1 | Active | DCE, INFO, Device, sFlow polling interval on 
port Ethernet 1/14 is changed to 40.

device(conf-if-eth-1/14)# no sflow polling-interval

2015/12/02-03:26:47, [SFLO-1006], 89, M1 | Active | DCE, INFO, Device, sFlow polling
interval on port Ethernet 1/14 is changed to 30