Re: Scotty mem usage growing

Buz Owen (ado@bbn.com)
Fri, 25 Jul 1997 17:26:10 -0400

> I'm writing my own little SNMP Agent using Scotty v2.1.5. The objective
> is to support the HOST MIB-II tree on various platforms (school work).
>...
> However, once my agent has been running for a while (say 24 hours),
> the scotty process memory usage gets huge....
>
> proc setMIB {var val} {
> global s
> $s instance $var $var $val
> }
>... Can I "uninstance" a variable >before updating it?

scotty should handle what you are doing without leaks, but try something like
the following anyway...

proc setMib {var val} {
global s mibval
if { ! [ info exists mibval($var) ] } {
$s instance $var mibval($var) $val
}
set mibval($var) $val
}

/b

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