Oups. Silly me.
Ok, translate works:
schamlian@ubuntu:/usr/local/share/snmp/mibs$ snmptranslate -m
+MPBC-RMH-MIB -IR -On mpbcRMH-Mon-HPU-State
.1.3.6.1.4.1.4464.3.2.3.6
Now I cannot create the C file.
schamlian@ubuntu:/usr/local/share/snmp/mibs$ mib2c -c ../mib2c.mdf.conf
MPBC-RMH-MIB
You didn't give mib2c a valid OID to start with. IE, I could not find
any information about the mib node "MPBC-RMH-MIB". This could be caused
because you supplied an incorrectly node, or by the MIB that you're
trying to generate code from isn't loaded. To make sure your mib is
loaded, run mib2c using this as an example:
env MIBS="+MY-PERSONAL-MIB" mib2c -c ../mib2c.mdf.conf MPBC-RMH-MIB
You might wish to start by reading the MIB loading tutorial at:
http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to display information about
your MIB node. Once snmptranslate works, then come back and try mib2c
again.
I also tried:
chamlian@ubuntu:/usr/local/share/snmp/mibs$ env MIBS="+MPBC-RMH-MIB" mib2c
-c ../mib2c.mdf.conf MPBC-RMH-MIB
I hope it is not a silly mistake again on my behalf?
Thanks
S.
On Wed, Dec 14, 2011 at 12:16 PM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:
> On 14 December 2011 17:00, Simon Chamlian <simon.chaml...@gmail.com>
> wrote:
> > Now I copied my MIB file MPBC-RMH-MIB into same directory.
>
> Into which directory? /usr/share/mibs/netsnmp ?
>
>
>
> > $ snmptranslate -m +MPBC-RMH-MIB -IR -On mpbcRMH-Mon-HPU-State
> >
> > MIB search path: /home/schamlian/.snmp/mibs:/usr/local/share/snmp/mibs
>
> Note the search path that the library is using.
> This mentions /usr/local/share/snmp/mibs
> but not /usr/share/mibs/netsnmp
>
> Try copying the MIB file into /usr/local/share/snmp/mibs
>
>
>
>
> > One difference between the embedded and the PC is that on the embedded
> > system, the mib file is called: MPBC-RMH-MIB.txt while on the PC, it is
> > called: MPBC-RMH-MIB
>
> No - that probably doesn't matter.
> The Net-SNMP MIB parser doesn't care about the names of files,
> or their extensions - it works purely on the contents of the file.
>
> You could put the MPBC-RMH-MIB definitions in a text file called
> GUESS-WHO-IS-COMING-TO-DINNER.jpg and it would
> work in exactly the same way. :-)
>
> Dave
>
------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits?
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users