newbie SNMP question

Micael Karlberg <>
Fri Dec 16 16:17:50 CET 2005


Hi,

karol wrote:
> Hi,
>   I have just started doing some Erlang and SNMP, and I need a help. Why are the modules snmpa and snmpm not loaded by default? My config for agent is : 

Modules are loaded when first used (unless you explicitly load them).

> [
>  {snmp,
>   [{agent,
>     [{config, [{dir, "/home/md/maindata_snmp/agent/conf/"}]},
>      {db_dir, "/home/md/maindata_snmp/agent/db/"}]}]}
> ].
> 
> and when I run it with : erl -sname agent -config agent, and I do m()., the only SNMP related modules are : 
> 
> snmp_app              /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app.beam
> snmp_app_sup          /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app_sup.beam
> snmp_community_mib    /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_community_mib.beam
> snmp_conf             /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_conf.beam
> snmp_framework_mib    /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_framework_mib.beam
> snmp_generic          /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_generic.beam
> snmp_misc             /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_misc.beam
> snmp_note_store       /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_note_store.beam
> snmp_notification_mi  /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_notification_mib.beam
> snmp_standard_mib     /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_standard_mib.beam
> snmp_target_mib       /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_target_mib.beam
> snmp_user_based_sm_m  /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_user_based_sm_mib.beam
> snmp_verbosity        /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_verbosity.beam
> snmp_view_based_acm_  /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_view_based_acm_mib.beam
> snmpa_agent           /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent.beam
> snmpa_agent_sup       /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent_sup.beam
> snmpa_general_db      /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_general_db.beam
> snmpa_local_db        /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_local_db.beam
> snmpa_mib             /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib.beam
> snmpa_mib_data        /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_data.beam
> snmpa_mib_lib         /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_lib.beam
> snmpa_misc_sup        /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_misc_sup.beam
> snmpa_mpd             /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mpd.beam
> snmpa_net_if          /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_net_if.beam
> snmpa_supervisor      /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_supervisor.beam
> snmpa_symbolic_store  /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_symbolic_store.beam
> snmpa_vacm            /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_vacm.beam
> 
> but why are the core modules missing? I mean, there are examples where the guys start manager like this (I think that snmp_mgr was renamed to snmpm later - is it true?)

I don't know what you mean by core modules.

No, snmp_mgr was not renamed to snmpm. It still exist, in the test
directory (now renamed to snmp_test_mgr, it was only a testtool anyway).
The manager which is part of the snmp application (as of version 4.0)
is a _new_ component.

Here is an example config file for a case whith the snmp application
only running a manager:

[{snmp,
   [
    {manager,
     [
      {versions, [v1,v2]},
      {server, [{verbosity, trace}]},
      {config, [{dir, "/ldisk/tests/snmp/4.x/manager/conf/"},
                {verbosity, trace},
                {db_dir, "/ldisk/tests/snmp/4.x/manager/db/"}]},
      {mibs, []}
     ]
    }
   ]
  }
].

Start the application in the same way ( application:start(snmp) ).

For the record, the version of the snmp application you are using is
old! Version 4.6.1 is part of R10B-9

/BMK



More information about the erlang-questions mailing list