Re: I am struggling to understand the snmptranslate command

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 11/07/06, Jeff Silverman <[email protected]> wrote:

> Is this problem the reason why snmpget doens't work?
>
> [jeffs@black ~]$ snmpget -v 2c -Le -c puBlIc localhost
> .1.3.6.1.2.1.4.31.1.1.17
> IP-MIB::ipSystemStatsInDiscards = No Such Object available on this agent
> at this OID


No.
The 'snmpget' command is interpreting the numeric OID, and translating it
into
the textual equivalent quite happily.  The problem lies elsewhere (see
below).


Here are some other things I have tried which still don't work the way I
> guess I expect them to.
>
> [jeffs@black ~]$ snmpget -v 2c -c public localhost system.sysDescr.0
> SNMPv2-MIB::sysDescr.0 = STRING: Linux black 2.6.15-1.2054_FC5 #1 Tue
> Mar 14 15:48:33 EST 2006 i686
> [jeffs@black ~]$ snmpget -v 2c -c public localhost SNMPv2-MIB::sysDescr
> SNMPv2-MIB::sysDescr = No Such Instance currently exists at this OID


That's because you've omitted the instance identifier(s).
A value is always associated with an *instance* of a MIB object,
not with the (abstract) object itself.   If you're familiar with
object-oriented
programming, think of a MIB object as similar to a class - you need to
declare one or more instances of that class before you can use it.

(And yes, I know that's not strictly true - e.g. "static" fields/methods!)

This is also the source of your earlier problem - you omitted the
instance subidentifier(s) for ipSystemStatsInDiscard


 Try using "snmpgetnext" or "snmpwalk" instead of "snmpget" with the discard
stats object.  That will retrieve the first (or all) instance of this
object.

Dave


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
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.