On Tue, Apr 12, 2011 at 4:10 AM, Dave Shield <[email protected]>wrote:

> On 11 April 2011 19:17, 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
> > .1.3.6.1.2.1.192.1.2 = No Such Object available on this agent at this
> OID
>
> Yes - that is correct.
> For "snmpget", you have to provide the OID of an instance of a column
> object within the table.   Not the OID of the table itself.
>
>
Sorry, snmpget return the result correctly:

# snmpget -v 2c -c public localhost .1.3.6.1.2.1.192.1.2.1.11.511
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.1.11.511 = STRING: "obs will be executed sequentially"


>
> > 3) snmptable
> >
> > # snmptable -v 2c -c public localhost .1.3.6.1.2.1.192.1.2
> > Was that a table? .1.3.6.1.2.1.192.1.2
>
> Do you have the SYSLOG-MSG-MIB loaded?
> While most of the client tools can work with numeric OIDs,
> snmptable *must* have the MIB file available, so that it
> knows which column objects to request.
>
> The same output:

# snmptable -v 2c -c public localhost syslogMsgTable
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

I also tried the command, same result:

# snmptable -v 2c -c public localhost SYSLOG-MSG-MIB::syslogMsgTable
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



>
> You still haven't provided the output from "snmpwalk"
> that I asked for.
>
>
Here is snmpwalk output (only partial, too long as a whole). I reset Index
counter to 1 in loop_free_at_end, and the snmpwalk just returns the latest
syslog record in snmpwalk command (the "stCnt: 1" is the debug record).

# snmpwalk -v 2c -c public localhost .1.3.6.1.2.1.192.1.2

syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.506 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.507 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.508 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.509 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.510 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.511 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.512 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.513 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1
.1.3.6.1.2.1.192.1.2.1.11.514 = STRING: "root) CMD (   cd / && run-parts
--report /etc/cron.hourly)"
syslogMsgTable_loop_free =======>>>>>> stCnt: 1

Strangely, snmpget returns the result correctly for each column, but
snmpwalk just returns the latest value in MIB?

-Zimmer
------------------------------------------------------------------------------
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