Re: Using scotty to catch traps

Juergen Schoenwaelder (schoenw@cs.utwente.nl)
Mon, 24 Feb 1997 22:07:41 +0100

Charles Menser <cmenser@PigsEye.Kennesaw.EDU> said:

Charles> I am having some trouble using scotty as a trap monitor.

Charles> What I would like to do is record all traps into a file.

Charles> I have tried the following simple test, and have had no luck:

Charles> mib load traps.asn
Charles> set session [snmp session -address myadddress]
Charles> $session bind "" trap { echo 'got one'}

Make sure that the session uses the correct community string.

Charles> Later I added:

Charles> while {1} {
Charles> snmp wait
Charles> sleep 3
Charles> }

This loop does not add any value. The trap binding should be evaluated
from the internal Tcl event loop. (You have to call "vwait forever" to
fall into the Tcl event loop if you are using tclsh instead of scotty.)

Charles> In addition, if I enable snmp watch, I see a decode of
Charles> some (but not all) traps arriving (I am using another
Charles> Sun to snoop for traps).

This means that scotty is discarding the incoming traps because they
do not match a registered trap handler session or the received packet
causes internal decoding errors. Check the parameters of your session
and check the contents of the received trap packet.
Juergen

-- 
Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
Computer Science Department, University of Twente,   (Fax: +31-53-489-3247)
P.O. Box 217, NL-7500 AE Enschede, The Netherlands.  (Tel. +31-53-489-3678)
--
!! 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.