On fre, 2006-11-10 at 19:14 +0530, bhushan wrote:
> hello friends,
> Greetings. I have written my own mib module using utility mib2c & also
> done with subagent which will invoke that mib module.
> mib module that i have written is for scalar oid variable with read
> access only & i also have added line in snmpd.conf master agentx to
> enable agentx support.
> in my current status i am able to get value of my variable using
> snmpget command but my problem is diffrent 
> [EMAIL PROTECTED] root]# snmpget -v 1 -c public localhost
> 1.3.6.1.4.1.16901.1.1
> SNMPv2-SMI::enterprises.16901.1.1 = INTEGER: 3
> 1.3.6.1.4.1.16901.1.1 is my variable oid. 
> so my problem is still i written my MIB file correctly & also place
> that in /usr/share/snmp/mibs/ directory as well i set
> MIBS env variable to ALL & MIBDIR env variable
> to /usr/share/snmp/mibs/ still o/p of snmpget 
> shows SNMPv2-SIM as root as shown above 
> for solution to this i tried to remove SNMPv2-SMI.txt from that
> directory then it shows some error then o/p ATN-MIB::ServerStatus =
> INTEGER: 0 so tried to remove ATN-MIB file then it shows 
> iso.3.6.1.4.1.16901.1.1 = INTEGER: 0 but it never say 
> MYOWN-MIB::  in o/p i want MYOWN-MIB name in o/p 
> please help me out of this  problem .

Removing mib files won't help you at all - start by restoring the ones
you removed.

After this I would ask you to unset MIBS and MIBDIR

Then, I would ask you to use (1)

snmptranslate -m MYOWN-MIB -M +/path/to/myOwnMib -Ib -Tp -PW myOwnVariable

This should - hopefully - print

+--myOwnVariable(1)

If it does then you can go on with (2)

snmptranslate -m MYOWN-MIB -M +/path/to/myOwnMib -Ib -Td -PW myOwnVariable

This should hopefully show you the definition of myOwnVariable as you
entered it in the MIB file.

If all of the above succeded then I would go on with (3)

snmpget -m MYOWN-MIB -M +/path/to/myOwnMib -v 1 -c public localhost 
myOwnVariable

and see what it wrote.

If on the other hand any of the above commands failed to do as expected
then I would suspect that there is a bug in the MIB file after all.

As a first step I would check if the net-snmp commands above says
something about errors or such things, but if that doesn't work then I
would go on by getting the libsmi package
(http://www.ibr.cs.tu-bs.de/projects/libsmi/) and then run (4)

SMIPATH=:/path/to/myOwnMib smilint MYOWN-MIB

and check all the error messages it produces.

/MF


-------------------------------------------------------------------------
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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to