All,
I am trying to find a way to determine how many sfp's a switch has. I figured out that I can use the 1.3.1.6.1.2.1.47.1.1.1.1.2 OID to get a physical description of the port. So if you do a show interface status, the last column on right will tell you if you have an SFP or not.
If the text is '1000BaseSX' or 'SFP-10Gbase-LR' or '1000BaseT' then it's an SFP. The problem is an SNMPWALK of the above OID table returns a value for every port. So what I'm trying to do is "grep" for only the text that is for SFP's. Does anybody know how I can filter results from a UDP?
So logically, I'm trying to return a value only if it's one of the 3 above, otherwise, don't list the result.
Below is an image of the result. I'm trying to only have the items with 1000BaseSX or 1000BaseT show up in the list. I don't want Port Container or any other text.
Any help would be great! Thanks!
