Re: [tkined] Any problems mixing sync. and async. queries (Scotty - snmp)

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 27 Jul 1998 19:02:16 +0200

>>>>> Peter Soares writes:

Peter> I am trying to determine if it is bad (or not prudent) to
Peter> initiate a synchronous request within an asynchronous request
Peter> handler (there may be other pending asynchronous responses).
Peter> All requests would be made to the same device (same scotty snmp
Peter> session). I am using scotty 2.1.8.

You should definately use 2.1.9 because it has an important fix for
asynchronous requests.

Anyway, your question is interesting. The SNMP code as it is currently
written will discard all SNMP responses for outstanding async. requests
while waiting for a response to a synchronous request. Scotty should
probably queue those responses internally and evaluate the callbacks
whenever the Tcl code falls back into the Tcl event loop. I have to
look closer into the code in order to find out how much work this is
and whether I am going to fix this in 2.1.X or only in 3.0.X.

Below is a script which shows the strange behaviour. It sets the # of
retries to 0 which causes a noResponse error for each dropped SNMP
message. If you run this script on a "reliable" network, you will see
noResponse errors because scotty dropped SNMP responses...

: unset tnm(mibs)
:
: proc recv {i s err vbl} {
: if {$err == "noError"} {
: puts "$i\t$vbl"
: } else {
: puts "$i\t** $err **"
: }
: flush stdout
: if {$i == 10} {
: puts "**\t[$s getnext sysUpTime]"
: }
: }
:
: if {$tnm(version) == "3.0.0"} {
: set s [Tnm::snmp generator -address xxxx -retries 0]
: } else {
: set s [snmp session -address xxxx -retries 0]
: }
:
: for {set i 0} {$i < 20} {incr i} {
: $s getnext sysUpTime [subst {recv $i "%S" "%E" "%V"}]
: }
: $s wait
: $s destroy

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 3289)

--
!! 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.