Re: filter interfaces in snmp-get output

Ilya Etingof <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
May be get run `snmpget` against the select of interfaces you need? Just get them by the full OID e.g. including the trailing index part.

$ snmpwalk -c public demo.snmplabs.com IF-MIB::ifName 
IF-MIB::ifName.1 = STRING: lo
IF-MIB::ifName.2 = STRING: eth0
IF-MIB::ifName.3 = STRING: eth1
IF-MIB::ifName.4 = STRING: ppp0

$ snmpget -c public demo.snmplabs.com IF-MIB::ifName.2 IF-MIB::ifName.4
IF-MIB::ifName.2 = STRING: eth0
IF-MIB::ifName.4 = STRING: ppp0

You can include other columns of the interfaces table into the query.

> On 19 Aug 2018, at 08:02, Fatemeh Mehdizadeh <[email protected]> wrote:
> 
> hi, I have interfaces eth0,eth1, eth2, pflog0 ,ipfw0 on my system.
> when I want to see my intefaces with snmp-get, it shows all of
> interfaces. I want to see just eth0 - eth2 and not the pflog and
> ipfw0. How should I do this?
> 
> Thanks all


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.