Using the net-snmp provided tools: For snmptable itself: the following may be of interest (but probably not,) however you're still going to get every single line: http://www.net-snmp.org/docs/man/snmptable.html
*-CB* Do not use GETBULK requests to retrieve data, only GETNEXT. [...] > *-Cr** REPEATERS* For GETBULK requests, *REPEATERS* specifies the > max-repeaters value to use. For GETNEXT requests, *REPEATERS* specifies > the number of entries to retrieve at a time. > Alternatively, you could use snmpwalk to start in the middle of the table and tell it to stop when it gets sufficiently far in: http://www.net-snmp.org/docs/man/snmpwalk.html *-CE {OID}* End the walk at the specified OID, rather than a simple > subtree. This can be used to walk a partial subtree, selected columns of a > table, or even two or more tables within a single command. > But I'm not convinced even that will work for grabbing all columns of a subset of rows *in one command* - http://intronetworks.cs.luc.edu/current1/html/netmgmt.html - ยง21.8 (SNMP Operations), but may be worth trying just in case. Anything more complicated/different than that, then I think you'll have to - find something already out there that does what you're after, - construct multiple snmpwalks across different columns, hoping that. between the calls. the data doesn't shift indices - write something more low-level yourself, or - consider whether you actually need this data, or whether it can be obtained by some other method (elsewhere under SNMP, or via a different protocol altogether.) On Thu, Sep 23, 2021 at 9:44 AM murali v <murali.venugo...@gmail.com> wrote: > Hi There, > > I'm trying to fetch a routing table from a Cisco router using > IP-FORWARDING-MIB => ipCidrRouteTable, which has got tens of lakhs of > records. using the snmptable command. > > using the below command, > > snmptable -m +IP-FORWARD-MIB -v2c -c public 192.168.0.1 1.3.6.1.2.1.4.24.4 > -Cf , > routing.csv > > Fetching all the records is not required. > > Is there a way to fetch only a few thousands of them to analyse using the > snmptable command. When I try to execute the command, it takes hours and > finally the process gets killed for some unidentified reason. > > Please gimme some inputs regarding this. > > Murali V > > _______________________________________________ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > -- PJH
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users