Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with snmptranslate

0 views
Skip to first unread message

Smith...@emc.com

unread,
Oct 23, 2007, 5:01:40 AM10/23/07
to
Hello,

I'm running on a Solaris9 platform with net-snmp v 5.4.1.

Within my $HOME/.snmp./mibs directory, I have a real simple MIB called
myMib with the following:

PPEVENTS-MIB DEFINITIONS ::= BEGIN

IMPORTS
enterprises, OBJECT-TYPE
FROM RFC1155-SMI;
-- OBJECT-TYPE
-- FROM RFC-1212
-- TRAP-TYPE
-- FROM RFC-1215;

--Textual conventions for this MIB


emc OBJECT IDENTIFIER ::= { enterprises 1139 }

bla .... bla ... bla ....


And so, when I go to $HOME/.snmp/mibs directory, and run the following
command:

snmptranslate .1.3.6.1.4.1.1139

I get the following:

.1.3.6.1.4.1.1139

So then, I try the following:

snmptranslate -n0 .1.3.6.1.4.1.1139

and get the following:

enterprises.1139

OK, I'm getting closer. But what I'm expecting to see is:

enterprises.emc

VERY IMPORTANT FYI - The tutorial mentions the use of -IR and other
options that aren't supported, however, this snmptranslate only has the
following options:

usage: snmptranslate [-n] [-d] [-r] [-w|-W] [-p] objectID

Any idea how I can get the desired output?
Thank you,
Randy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield

unread,
Oct 23, 2007, 5:34:53 AM10/23/07
to
On 22/10/2007, Smith...@emc.com <Smith...@emc.com> wrote:
> VERY IMPORTANT FYI - The tutorial mentions the use of -IR and other
> options that aren't supported, however, this snmptranslate only has the
> following options:
>
> usage: snmptranslate [-n] [-d] [-r] [-w|-W] [-p] objectID

That doesn't sound like the 'snmptranslate' command from the Net-SNMP
project. Where did this command come from?

You could try specifying the object as

snmptranslate PPEVENTS-MIB::emc

but if you're using a command from a different package, then
you really need to talk to the people who wrote it. We can't provide
support for other people's software.

Dave

Dave Shield

unread,
Oct 23, 2007, 11:33:53 AM10/23/07
to
[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]

On 23/10/2007, Smith...@emc.com <Smith...@emc.com> wrote:
> You're right, it was an snmptranslate command in another path.
> Nevertheless, even with net-snmp's 'snmptranslate'
> (net-snmp-5.4.1/apps), with my MIB located in $HOME/.snmp/mibs, when I
> issue:
>
> PP-EVENTS-MIB::emc
>
> I get the following error:
>
> vobs lca1099 > pwd
> /emc/smithr15/net-snmp-5.4.1/apps
> vobs lca1099 > snmptranslate PP-EVENTS-MIB::emc
> No log handling enabled - turning on stderr logging
> Cannot find module (PP-EVENTS-MIB): At line 0 in (none)
> PP-EVENTS-MIB::emc: Unknown Object Identifier

That's because the MIB is called "PPEVENTS-MIB",
not "PP-EVENTS-MIB".

You know that the two are meant to refer to the same thing.
_I_ know that the two are meant to refer to the same thing.
But computers are thick, and assume that they're completely different!

Smith...@emc.com

unread,
Oct 23, 2007, 12:04:51 PM10/23/07
to
ok, on line 1 I changed the PPEVENTS-MIB to PP-EVENTS-MIB, issued the
same command, and still get the same results.
Does there have to be a MODULE-IDENTITY statement in the MIB perhaps for
snmptranslate to find it? The smithy tool used to create this MIB in
SNMPv2 format didn't include such a statement, I wonder if that's the
problem?

BTW, when I issue the same command on other MIBS found in
$HOME/.snmp/mibs, such as the following:

snmptranslate TUNNEL-MIB::tunnelMIBObjects

it works.

Wes Hardaker

unread,
Oct 23, 2007, 1:49:26 PM10/23/07
to
>>>>> "SR" == Smith Randy <Smith...@emc.com> writes:

SR> ok, on line 1 I changed the PPEVENTS-MIB to PP-EVENTS-MIB, issued the
SR> same command, and still get the same results.
SR> Does there have to be a MODULE-IDENTITY statement in the MIB perhaps for
SR> snmptranslate to find it? The smithy tool used to create this MIB in
SR> SNMPv2 format didn't include such a statement, I wonder if that's the
SR> problem?

I'd strongly suggest starting by reading the following document if you
haven't:

http://www.net-snmp.org/wiki/index.php/Writing_your_own_MIBs

--
Wes Hardaker
Sparta, Inc.

Smith...@emc.com

unread,
Oct 24, 2007, 8:37:33 AM10/24/07
to
Well, it turns out that the problem was in our MIB. We thought that we
had converted our MIB over to SMIv2 but it was still at v1, so the
snmptranslate command wasn't picking it up.

Thanks to all for your time,
Randy

-----Original Message-----
From: Wes Hardaker [mailto:hard...@users.sourceforge.net]
Sent: Tuesday, October 23, 2007 1:44 PM
To: Smith, Randy
Cc: D.T.S...@liverpool.ac.uk; net-snm...@lists.sourceforge.net
Subject: Re: Problems with snmptranslate

0 new messages