In this case 5950 is an exception from other switches and supports both sFlow and Netstream. One important note - Netstream and sFlow are mutually exclusive. You cannot enable both on the same port.
I think this guide will be very helpful - https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00078383en_us It's got configuration guidance and examples for both sampling protocols. Please, pay attention that not all 5950 support Netstream:
NeStream is not available on the following switches:
HPE FlexFabric 5950 32QSFP28 switch (JH321A)
HPE FlexFabric 5950 32QSFP28 TAA-compliant switch (JH322A)
Also on supported switches it has certain limitations:
- After you enable NetStream on an HPE FlexFabric 5950 4-slot switch (JH404A) or HPE FlexFabric 5950 48SFP28 8QSFP28 switch (JH402A), the two Gigabit SFP ports on the back panel become unavailable.
- NetStream is not available on the two Gigabit SFP ports on the back panel of the HPE FlexFabric 5950 4-slot switch (JH404A) or HPE FlexFabric 5950 48SFP28 8QSFP28 switch (JH402A).
But good news is that 5950's Netstream implementation also has 'ip netstream filter' command, so maybe in your particular case it will be more suitable than sFlow.
And as we discussed above you can't sample traffic on Vlan-interfaces, only physical ports.