Re: [tkined] concurrency

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Fri, 1 May 1998 18:53:58 +0200

>>>>> Michel Sim writes:

Michel> I implemented an SNMP agent using scotty which receives data
Michel> periodically from another entity developed in C via socket.
Michel> I'm having doubts about atomicity of operations. Suppose the
Michel> agent receives an SNMP request from a manager which called the
Michel> command "mib walk" on a MIB subtree (a table). I understood (I
Michel> might be wrong) that a series of GetBulk requests are sent
Michel> until a response shows that it reached another subtree. My
Michel> question is: What happens if new data is received on the
Michel> socket while the agent processes the SNMP request? Will the
Michel> agent refresh the values in the MIB? If so, will the manager
Michel> receive inconsistent data between different columnar objects
Michel> from the polled table?

There a couple of things here:

First, the Tnm SNMP engine itself processes a complete SNMP request
without processing any other events. However, if the script calls
commands that process events (e.g., the Tcl `update' command), then
some events might be processes while a request is being answered.

Second, a walk usually causes multiple getnext or getbulk
requests. The Tnm SNMP engine falls back into the Tcl event loop
whenever a request has been answered. It is therefore possible that
other file or timer events are processed between the getnexts/getbulks
of a MIB walk. (And there is no way around it because the agent does
not know where a walk stops.)

Third, you should walk the tables row by row instead of column by
column. This ensures that the rows are itself consistent. It does not
ensure that the whole table is consistent. (There is no general way to
read a complete table in a consistent way with SNMP.)

Juergen

Juergen Schoenwaelder schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany. (Tel. +49 531 / 391 3283)

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.