[erlang-questions] SNMP v3 change made to TrapExit's SNMP tutorial

Scott Lystig Fritchie <>
Fri Mar 9 09:41:55 CET 2007

Mina-san: I wanted to let the rest of the world know that I've made an
edit(*) to TrapExit's nifty SNMP tutorial,

It isn't really a big deal, except that I've spent an absurd amount of
time bloodying my forehead on a SNMP v3 brick wall.  My major
discoveries over the last couple of days have been:

1. The snmp:config/0 function is quite helpful, except for one small
   detail.  The default is to put all agent-related *.conf and
   manager-related *.conf files in the same directory (the cwd).
   However, the agent and manager have *very* different files with the
   *same* name, "usm.conf".(**)

   While trying to figure out why application:start(snmp) was failing,
   then digging into the OTP source code, I couldn't figure out if the
   "usm.conf" file should contain a 6,7-tuple or a 13-tuple.  The
   answer, it turns out, is "It depends on which version of the

   Except that snmp:config/0 overwrites one of them to create the

2. Vance Shipley's posting back in April 2005 mentioned the
   snmp:passwd2localized_key/3 function and that it was undocumented.
   My poor point-and-click browsing skills couldn't find it in the
   R11-B3 snmp reference manual.

   It turns out that the TrapExit SNMP tutorial flipped the 2nd & 3rd
   arguments to that function.  My little edit to the tutorial simply
   points out that error.

I guess this is a long way to suggest:
    * snmp:config/0 is nice but could be slightly nicer
    * snmp:passwd2localized_key/3 is still not documented (?) but
      could use a short blurb in the reference manual
    * this message may be helpful to another lost soul {shrug}

I can finally use NET-SNMP's "snmpwalk" to traverse the OID tree using
SNMP v1, v2c, and v3(***), hooray!  Now to tackle the hard stuff....


(*) I have to apologize for not making a complete, fix-all-the-errors
edit.  I don't have enough time & consciousness this late at night to
do all of the cut-and-paste stuff that would be required to fix all of
the encrypted passphrase examples, sorry!

(**) Which probably cannot be changed without breaking some backward
compatibility something-or-other?  None of the other SNMP app config
files have name conflicts, but is renaming the two "usm.conf" files
too impractical?  Perhaps read "usm_newname.conf" first and, if not
there, fall back to old behavior by trying "usm.conf" second?

(***) Which gives me a sliver of confidence that my customer's SNMP
tools (which I don't have access to) can also do so.

More information about the erlang-questions mailing list