Dave, here is another example I copied from snmptable manual page, it failed
either:

# snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 ifTable
MIB search path:
/root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/usr/share/mibs/snmp
Cannot find module (NET-SNMP-EXAMPLE-MIB): At line 0 in (none)
Was that a table? .1.3.6.1.2.1.2.2


# snmptable -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 localhost ifTable
MIB search path:
/root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/usr/share/mibs/snmp
Cannot find module (NET-SNMP-EXAMPLE-MIB): At line 0 in (none)
Was that a table? .1.3.6.1.2.1.2.2

ifTable, as has been mentioned, has been compiled into snmpd.

Thanks for the help,
-Zimmer


On Mon, Apr 11, 2011 at 2:17 PM, Zimmer Hu <[email protected]> wrote:

> Here are exact output:
>
> 1a) snmpget
>
> # snmpget -v 2c -c public localhost .1.3.6.1.2.1.192.1.2
> MIB search path:
> /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/usr/share/mibs/snmp
> Cannot find module (NET-SNMP-EXAMPLE-MIB): At line 0 in (none)
> .1.3.6.1.2.1.192.1.2 = No Such Object available on this agent at this OID
>
>
> 3) snmptable
>
> # snmptable -v 2c -c public localhost .1.3.6.1.2.1.192.1.2
> MIB search path:
> /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/usr/share/mibs/snmp
> Cannot find module (NET-SNMP-EXAMPLE-MIB): At line 0 in (none)
> Was that a table? .1.3.6.1.2.1.192.1.2
>
> mbrowse can find the .1.3.6.1.2.1.192.1.2 as syslogMsgTable.
>
>
>
>
> On Mon, Apr 11, 2011 at 12:24 PM, Dave Shield 
> <[email protected]>wrote:
>
>> On 11 April 2011 15:48, Zimmer Hu <[email protected]> wrote:
>> >> What was the exact "snmpget" command that you tried?
>> >> (And for comparison, what's the full output from snmpwalk?)
>> >>
>> >
>> > Here are the outputs:
>> >
>> > 1) snmpget:
>> > 1a) command line: snmpget  ...  Table.1.Column1.index
>>
>> Please can you post the *exact* command that you are using.
>> Preferably cut-and-paste from the command line.
>>
>> Not a generalised version of it - the *exact* command please.
>>
>>
>> > 2) snmpwalk:
>> >
>> > 2a) CLI: snmpwalk ... Table.1.Column1
>> >
>> >      output: OK. Read all vaule for one column; (but read whole table
>> failed
>> > with error same as that in 1a))
>>
>> Again, that's really too vague to be useful.
>> Please post the exact command(s) and full output.
>>
>>
>>
>>
>> > I just can't conceive an example let me go through one row's columns
>> first,
>> > then move to next row....    Is this to say Snmpv1 is not capable to
>> handle
>> > table efficiently
>>
>> It's nothing to do with SNMPv1 vs SNMPv2  - this is a consequence of
>> the basic behaviour of the GETNEXT command,  combined with the
>> OID ordering rules of SMI.
>>   An "snmpwalk" will *always* traverse tables column by column,
>> rather than row-by-row.   Regardless of version.  That's how SNMP works.
>>
>>
>> > (maybe snmpget ... table.column1, table.column2,..., table.columnX can
>> do it)?
>>
>> "snmpget" is no use here - GET requires you to know the index(es) of
>> each row in advance.    You'd need to use "snmpgetnext" instead - that
>> could indeed take all of the column objects as parameters, and walk
>> the table in parallel.
>>
>>   Or else use the "snmptable" command, which does exactly this already.
>>
>>
>> > Is this to say Snmpv1 is not capable to handle table efficiently
>>
>> SNMPv1 can handle this perfectly sensibly - you just need to
>> use the right tool.   Have a look at the workings of "snmptable"
>> rather than "snmpwalk".
>>
>>
>>
>> >               I'm implementing my project based on
>> > net-snmp table, and I need to return one row after the other in order.
>>
>> No - you don't.   You need to return the results appropriate
>> for whatever was in the incoming request.
>>
>> If the incoming requests are asking for each row in turn,
>>   then that's what the agent should report.
>> If the incoming requests are asking for random elements,
>>   then *that* is what the agent should report.
>> As long as the agent is working correctly, then you'll get
>>  the right results.
>>
>> But it's up to the client tools to request the appropriate OIDs,
>> and keep track of what to ask for next.     SNMP is essentially
>> a "stateless" protocol (much the same as HTTP), and the
>> agent doesn't need to keep track of who has asked it for what.
>>
>>
>> Dave
>>
>
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to