Hi Devi,
The increase shown in top is memory usage by the application; all
increased bytes might have not been leaked.
You need to free the varbinds after sending each trap/inform.
snmp_free_varbind(notification_vars);
refer: http://www.net-snmp.org/dev/agent/notification_8c-example.html
Print the "top" output after freeing varbind and check the usage.
Are you using single session to send all trap/inform or creating
session before sending each inform/trap?
-
Santhosh
________________________________________
From: Devi U [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 13, 2007 6:44 PM
To: [email protected]
Cc: SANTHOSH S (WT01 - Broadband Networks)
Subject: RE: how to purify net-snmp code
Hi,
thanx santhosh..
I am able to purify the code..
I feel that memory leak is there when send_v2trap is called, but i am not
getting any MLK/PLK in traces
top display:
26760 root 1 0 19 9248K 5608K run 0:01 0.30% snmpd
top display after a trap is sent ===> for each trap sent there is a increase
of 40K in SIZE and goes upto 50M.
26760 root 1 0 19 9288K 5648K run 0:01 0.31% snmpd
we are using net-snmp version 5.3.0.1.
whether above increase in SIZE is memory leak?
Thanx,
Devi.U
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders