Re: Scotty mem usage growing

Sveinar Rasmussen (sveinarr@stud.cs.uit.no)
Wed, 30 Jul 1997 12:34:01 +0200 (METDST)

On Tue, 29 Jul 1997, Buz Owen wrote:

> >... various problems with scotty agent code..
>
> try the following. open two shell windows on the same machine - the one you
> are trying to use as an agent. start scotty in each.
>
> in the first type:
>
> set s [snmp session -agent {} -port 1601]
> $s instance sysName.0 namevar default-value
> set namevar first-value
>
> now in the second, type:
>
> set s [snmp session -port 1601]
> $s get sysName.0
>
> you should see
>
> {1.3.6.1.2.1.1.5.0 {OCTET STRING} first-value}
>
> if you don't, your scotty is broken. if you see default-value in the
> result, there is a problem with binding the instance to the variable.
>
> also try typing in the second window:
>
> $s get sysDescr.0
>
> You should see:
>
> {1.3.6.1.2.1.1.1.0 {OCTET STRING} {scotty agent version 2.1.6
> (sun4m-SunOS-4.1.4)}}
>
> If you get something intellible, but notably different, you may somehow be
> talking to the wrong agent.
>
> If you get all of these results, then try putting the second session on
> whatever machine you are using as the manager. Add "-address <agenthost>" in
> the second session to address your agent. You should still be able to get the
> results above.
>
> If all of this works, maybe the problem is in your browser, or maybe you are
> trying to use the official snmp port (161) on your machine but the system isn't
> allowing scotty to bind it. Try repeating the above test on the two machines
> without the "-port 1601" argument.
>
> hope this helps/buz
>

Hurray! I'm so happy now -- the memory leak is gone and the update of
variables works elegantly in scotty now. A million thanks to the people
who have come with excellent tips!

My problem was the following: scotty got bigger and bigger using only
instances and not updating the global variable. There was a problem with
binding the global variable to the scotty internals.

The solution was: Removing the "-agent $interp" where $interp contains the
safe tcl/scotty commands allowed to be executed. I replaced this with
"-agent {}" and things worked right away. Thanks to Buz's little example!

Hm... Guess I really should have used "safe tcl/scotty" commands as done
in the scotty agent example (distribution). Is it bad to skip this
safety stuff? If so, what's the deal with the aliasing? I have a proc
that updates the mib (setMIB), should I add a "setMIB alias" ? or should
I add every Tcl command in the alias list?

However, it works now!!! Lovely!!! I'm happy :)
Thanks again, folks!

_______________________________________________________________________
| Sveinar Rasmussen -*- Attend master of comp.sci. engineering course |
| sveinar@rasmussen.org -*- http://www.cs.uit.no/~sveinarr/ |

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