Re: error in mib2c generated files

devel tech <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAFcNWF8H_nsHwTCs=N0gkjV0ub-tH7ku=DoU14xmTWbX2bQtWA@mail.gmail.com>
Thanks sir!

Mistakenly i saved MIB by name TEST-MIB.txt but inside the MIB i wrote
TEST-ENTERPRISE-MIB,


and

I read about scalar instance subidentifier from "
http://www.webnms.com/cagent/help/technology_used/c_snmp_overview.html" and
i find out the mistake that i was doing..

I was missing 0 at the end of Object name while running snmpget command. i
read some detail what is the purpose of it.
Sir! when i run command for  sysName  object without '0' , i got same error
that i got for my MIB object 'teststr'.

I concluded that i was missing 0 at the end of Object Name while running
command of snmpget. then i placed it at the end of object name but got same
error.

snmpget -v 1 localhost -c public teststr.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: TEST-ENTERPRISE-MIB::teststr.0

I have read about snmp and how it works and also seen codes of net-snmp, but
i will study it again.


Thanks
On Tue, Aug 30, 2011 at 1:31 PM, Dave Shield <[email protected]>wrote:

> On 30 August 2011 05:56, devel tech <[email protected]> wrote:
> > i performed following snmptranslate steps and got responses.
> >    snmptranslate -IR TEST-MIB::teststr
> >    Cannot find module (TEST-MIB): At line 0 in (none)
>
> That is not surprising - the name of the MIB is
> TEST-ENTERPRISE-MIB    not TEST-MIB
>
> Please see the FAQ question
>    How do I add a MIB to the tools?
>
>
>
>
> > now i run snmpget command to get the value of teststr object but i got
> > following response
> > command :  snmpget -v 1 -c public localhost teststr
> > Error
> > -------------
> > Error in packet
> > Reason: (noSuchName) There is no such variable name in this MIB.
> > Failed object: TEST-ENTERPRISE-MIB::teststr
> > -----------------------
>
> Also correct.
> This is a scalar object, so needs the scalar instance subidentifier.
>
>
> These two mistakes illustrate perfectly why I suggested that you
> start with the basics of *using* SNMP, before moving on to
> advanced topics like writing your own code.
>   If you don't properly understand how SNMP works (and I would
> agree there are some subtle unexpected features),  then it makes
> the task of writing your own MIBs doubly hard.
>
>
> Dave
>

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev

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