from pysnmp.entity.rfc3413.oneliner import cmdgen
oid = (1,3,6,1,2,1,1,1,0)
address = ("192.168.1.1", 161)
def get_counter():
cmd = cmdgen.CommandGenerator()
comm = cmdgen.CommunityData("test", "public", 0)
result = cmd.getCmd(comm,
cmdgen.UdpTransportTarget(address), oid)
return result
import psyco
psyco.full()
# psyco.bind(get_counter) works fine!
for i in xrange(100):
print get_counter()
Logged In: YES
user_id=4771
Originator: NO
I'm afraid I don't have the time necessary to find the cause of the leak.
It is likely to turn out to be a known issue anyway - e.g. creating new
classes or functions all the time can make Psyco create new code paths
all the time, and old code path are never freed (and keep the old classes
and functions alive forever).