SNMP instrumentation operation 'delete' not called

Vance Shipley vances@REDACTED
Sun Jun 5 03:49:05 CEST 2005


The SNMP User's Guide describes the instrumentation callback functions
in section 10; Definition of Instrumentation Functions:

   "THE function f(delete [, ExtraArgs]) is called for each object
    in an MIB when the MIB is unloaded from the agent. This makes
    it possible to perform necessary clean-up."

However this function never gets called!

I see 'new' operation get called but never 'delete':

fooVar(Op) ->
   io:fwrite("fooVar(~w)~n", [Op]).

1> snmpa:load_mibs(snmp_master_agent, ["FOO-MIB"]).
fooVar(new)
ok
2> snmpa:unload_mibs(snmp_master_agent, ["FOO-MIB"]).
ok

I'm assuming this is a bug in either the documentation or implementation.

I had been intending to use these callbacks to turn SNMP indexing on
and off on the tables being accessed:

fooTable(new) ->
   mnesia:snmp_open_table(fooTable, [{key, string}]);
   ...;
fooTable(delete) ->
   mnesia:snmp_close_table(fooTable, [{key, string}]),
   ....

This would allow the table accesses to occur without the extra overhead
of SNMP indexing when SNMP was not in use.

	-Vance



More information about the erlang-questions mailing list