This is a multi-part message in MIME format.

--===============1317354946==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C772DA.787ED080"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C772DA.787ED080
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Santhosh,
=20
Thanx for ur information and timely help.
I have uncommented and tested, even then 40K increase there for every trap=
sent.
=20
we have not used table in notification, but have one table in the same MIB=
for which get,getnext and getbulk is allowed.
=20
we have not added any OID to trap var bind which is defined as/under table.
=20
I have noted that memory size is not increasing beyond 47MB.
=20
Initially when started memory size is nearly 8K. I guess for nearly 1024=
traps(1024*40K=3D40M) ,memory usage increases and after that it is not=
increasing.
=20
I dont why netsnmp_set_row_column() is hit in gdb while sending the traps.=
=20
=20
Thanx,
Devi.U
=20

________________________________

From: santhosh.sundarasamy@wipro.com=
[mailto:santhosh.sundarasamy@wipro.com]
Sent: Fri 3/30/2007 4:24 PM
To: Devi U; net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify net-snmp code



Devi,

=20

Please find my inline comments.

Regards,=20
Santhosh=20

________________________________

From: Devi U [mailto:udevi@TechMahindra.com]=20
Sent: Friday, March 30, 2007 3:22 PM
To: SANTHOSH S (WT01 - Broadband Networks);=
net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify net-snmp code

=20

=20

=20

Hi,

=20

Very Sorry for my late reply. I was assigned to other works and back to=
this problem now.

after freeing varbind, memory usage was not reduced.

=20

we are sending traps only and traps are received properly in management=
system configured.(Verified thro' Advent Net Manager - Trap viewer)

I have cross verified with other implementations and i cant find any=
problem in our implementation.

=20

Using gdb , I have identified that out of 40 K=20

1. 8K is increased in method -=20

=20

agent/agent_trap.c - send_trap_to_sess(netsnmp_session * sess,=
netsnmp_pdu *template_pdu)

=20

we are using net-snmp version 5.3.0.1 and line 881 /*=
snmp_free_pdu(pdu); */ is commented.

In net-snmp version 5.4 it is uncommented.

[Santhosh] we used 5.2.1. This might be the issue, Uncomment=
snmp_free_pdu() in 5.3.0.1 and verify.

=20

2. 32 K ( increasing by 8 K for every call,this method is called in for=
loop ) is increased in method -=20

agent/helpers/table_dataset.c - netsnmp_set_row_column(netsnmp_table_row=
*row, unsigned int column,
int type, const char=
*value, size_t value_len)

=20

I doubt whether memory allocated and pointed to by row is freed or not.

=20

=20

Code flow to netsnmp_set_row_column=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

#0 netsnmp_set_row_column (row=3D0x187a8b8, column=3D3, type=3D2, value=
=3D0xffbfeb74 "", value_len=3D4)
at table_dataset.c:1224
#1 0xff2c226c in log_notification (pdu=3D0x181dfa8, transport=3D0x3408)
at notification-log-mib/notification_log.c:687
#2 0xff2bcc0c in send_notifications (major=3D2136456, minor=3D7, serverarg=
=3D0x2ffd08,
clientarg=3D0xff304fe8) at notification/snmpNotifyTable.c:260
#3 0xff15ace0 in snmp_call_callbacks (major=3D1, minor=3D7, caller_arg=
=3D0x2ffd08) at callback.c:323
#4 0xff3688b0 in netsnmp_send_traps (trap=3D-1, specific=3D-1, enterprise=
=3D0xff392a64,
enterprise_length=3D10, vars=3D0x2209320, context=3D0x0, flags=3D0) at=
agent_trap.c:783
#5 0xff3689d0 in send_enterprise_trap_vars (trap=3D-1, specific=3D-1,=
enterprise=3D0xff392a64,
enterprise_length=3D10, vars=3D0x2209320) at agent_trap.c:797
#6 0xff29d0bc in send_eventTrap_trap () at ssg/ssg.c:1349 <------ Here we=
called send_v2trap
#7 0xff15d940 in run_alarms () at snmp_alarm.c:251 =20

[Santhosh] Are you adding any OID to trap var bind which is defined=
as/under table? To isolate the issue remove table varbinds in trap PDU=
and see the memory usage.=20

If with out any table OID added in the trap memory size reduced, then the=
issue is with the dataset (you might have used mib2c.create-dataset.conf=
template to implement your private table).=20

=20

=20

Thanx,

Devi.U

=20

________________________________

From: santhosh.sundarasamy@wipro.com=
[mailto:santhosh.sundarasamy@wipro.com]
Sent: Wed 3/14/2007 12:08 PM
To: Devi U; net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify net-snmp code

=20

Devi,
After freeing varbind, usage should decrease; PDU is already freed=
in netsnmp_send_traps() itself ( invoked by send_v2trap). Sending trap or=
inform? Are you receiving the traps in trapd? Cross check the API usage=
in other implementations (grep send_v2trap `find . -name "*.c"`)

We used method similar to apps/snmptrap.c and there is no memory=
usage raised / leaks. Pls refer snmptrap.c file for session creation &=
deletion.

-
Santhosh

________________________________________
From: Devi U [mailto:udevi@TechMahindra.com]
Sent: Tuesday, March 13, 2007 7:30 PM
To: SANTHOSH S (WT01 - Broadband Networks);=
net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify net-snmp code

=20
Santhosh,
=20
Thanx for ur immediate response.
followed the same example - /examples/notification.c
=20
snmp_free_varbind is called in our code after send_v2trap().
=20
In top output, i can see the size remains same even after=
snmp_free_varbind() is called.should size decrease after free is called?
=20
For every 100 msec, callback will be called,snmp_varlist_add_variable() is=
used to store the variables and send_v2trap() is called for sending a=
single trap.
=20
I dont know how to create session / send all traps in a single session.
=20
Thanx,
Devi.U
________________________________________
From: santhosh.sundarasamy@wipro.com=
[mailto:santhosh.sundarasamy@wipro.com]
Sent: Tue 3/13/2007 7:03 PM
To: Devi U; net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify net-snmp code

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/no...c-example.html =20

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:udevi@TechMahindra.com]
Sent: Tuesday, March 13, 2007 6:44 PM
To: net-snmp-coders@lists.sourceforge.net
Cc: SANTHOSH S (WT01 - Broadband Networks)
Subject: RE: how to purify net-snmp code

Hi,
=20
thanx santhosh..
I am able to purify the code..
=20
I feel that memory leak is there when send_v2trap is called, but i am not=
getting any MLK/PLK in traces
=20
top display:
=20
26760 root 1 0 19 9248K 5608K run 0:01 0.30% snmpd
=20
top display after a trap is sent =3D=3D=3D> 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
=20
we are using net-snmp version 5.3.0.1.
=20
whether above increase in SIZE is memory leak?
=20
Thanx,
Devi.U


The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you=
are not the intended recipient, you should not disseminate, distribute or=
copy this e-mail. Please notify the sender immediately and destroy all=
copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient=
should check this email and any attachments for the presence of viruses.=
The company accepts no liability for any damage caused by any virus=
transmitted by this email.

www.wipro.com


The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you=
are not the intended recipient, you should not disseminate, distribute or=
copy this e-mail. Please notify the sender immediately and destroy all=
copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient=
should check this email and any attachments for the presence of viruses.=
The company accepts no liability for any damage caused by any virus=
transmitted by this email.

www.wipro.com

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D

Tech Mahindra, formerly Mahindra-British Telecom.

Disclaimer:

This message and the information contained herein is proprietary and=
confidential and subject to the Tech Mahindra policy statement, you may=
review at http://www.techmahindra.com/Disclaimer.html externally and=
http://tim.techmahindra.com/Disclaimer.html internally within Tech=
Mahindra.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D
=09

The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you=
are not the intended recipient, you should not disseminate, distribute or=
copy this e-mail. Please notify the sender immediately and destroy all=
copies of this message and any attachments.=20

WARNING: Computer viruses can be transmitted via email. The recipient=
should check this email and any attachments for the presence of viruses.=
The company accepts no liability for any damage caused by any virus=
transmitted by this email.

www.wipro.com
=09


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D

Tech Mahindra, formerly Mahindra-British Telecom.
=20
Disclaimer:

This message and the information contained herein is proprietary and=
confidential and subject to the Tech Mahindra policy statement, you may=
review at =3D"http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.co=
m/Disclaimer.html externally and =3D"http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.co=
m/Disclaimer.html internally within Tech Mahindra.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D
------_=_NextPart_001_01C772DA.787ED080
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

=3Diso-8859-1">
=
=
>






RE: how to purify net-snmp code










=3D2>Santhosh,

 

Thanx for ur information and=
timely=20
help.

I have uncommented and tested,=
even then=20
40K increase there for every trap sent.

 

we have not used table in=
notification, but=20
have one table in the same MIB for which get,getnext and getbulk is=20
allowed.

 

we have not added any OID to trap var=
bind=20
which is defined as/under table.

 

I have noted that memory size is=
not=20
increasing beyond 47MB.

 

Initially when started memory=
size is=20
nearly 8K. I guess for nearly 1024 traps(1024*40K=3D40M)  ,memory=
usage=20
increases and after that it is not increasing.

 

I dont why=
netsnmp_set_row_column() is hit=20
in gdb while sending the traps.

 

Thanx,

Devi.U

 





From: santhosh.sundarasamy@wipro.com=20
[mailto:santhosh.sundarasamy@wipro.com]
Sent: Fri 3/30/2007 4:24=
=20
PM
To: Devi U;=20
net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify=
=20
net-snmp code




=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">Devi,


=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">
 


=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">          &nbs=
p;=20
Please find my inline comments.



=20
style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">Regards,=20

Santhosh
style=3D"FONT-SIZE: 11pt; FONT-FAMILY: 'Book=
Antiqua'">



face=3D"Times New Roman" size=3D3>



style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY:=
Tahoma">From:
face=3DTahoma size=3D2> Tahoma"> Devi U=20
[mailto:udevi@TechMahindra.com]
style=3D"FONT-WEIGHT: bold">Sent:
Friday, March 30, 2007 3:22=20
PM
To: SANTHOSH S (WT01=
-=20
Broadband Networks); net-snmp-coders@lists.sourceforge.net
style=3D"FONT-WEIGHT: bold">Subject: RE: how to purify net-snmp=
=20
code


style=3D"FONT-SIZE: 12pt"> 




style=3D"FONT-SIZE: 12pt"> 




style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Very Sorry for my late reply.=
I was=20
assigned to other works and back to this problem=
now.



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">after freeing varbind, memory=
usage=20
was not reduced.



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">we are sending traps only and=
traps=20
are received properly in management system configured.(Verified thro'=
Advent Net=20
Manager - Trap viewer)



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have cross verified with=
other=20
implementations and i cant find any problem in our=20
implementation.



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Using gdb  , I have=
identified=20
that out of 40 K



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">1. 8K is increased in method=
-=20



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">  =
agent/agent_trap.c -=20
send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu=20
*template_pdu)



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">   we are using=
net-snmp=20
version 5.3.0.1 and line 881 /* snmp_free_pdu(pdu); */ is=20
commented.



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">   In net-snmp=
version 5.4=20
it is uncommented.


=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">[Santhosh] we=20
used 5.2.1. This might be the issue, Uncomment snmp_free_pdu() in 5.3.0.1=
and=20
verify.



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">2. 32 K ( increasing by 8 K=
for=20
every call,this method is called in for loop )  is increased in method=
-=20



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">  =20
agent/helpers/table_dataset.c - netsnmp_set_row_column(netsnmp_table_row=
*row,=20
unsigned int=20
column,
          &nbs=
p;            &=
nbsp;=20
            &nb=
sp;         =20
int type, const char *value, size_t value_len)



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">   I doubt whether=
memory=20
allocated and pointed to by row is freed or=20
not.



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">  =20



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Code flow to=20
netsnmp_set_row_column



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=
=3D



style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">#0 =
netsnmp_set_row_column=20
(row=3D0x187a8b8, column=3D3, type=3D2, value=3D0xffbfeb74 "",=20
value_len=3D4)
    at table_dataset.c:1224
#1 =20
0xff2c226c in log_notification (pdu=3D0x181dfa8,=20
transport=3D0x3408)
    at=20
notification-log-mib/notification_log.c:687
#2  0xff2bcc0c in=20
send_notifications (major=3D2136456, minor=3D7,=20
serverarg=3D0x2ffd08,
    clientarg=3D0xff304fe8) at=20
notification/snmpNotifyTable.c:260
#3  0xff15ace0 in=
snmp_call_callbacks=20
(major=3D1, minor=3D7, caller_arg=3D0x2ffd08) at callback.c:323
#4 =
0xff3688b0=20
in netsnmp_send_traps (trap=3D-1, specific=3D-1,=20
enterprise=3D0xff392a64,
    enterprise_length=3D10,=20
vars=3D0x2209320, context=3D0x0, flags=3D0) at agent_trap.c:783
#5 =
0xff3689d0=20
in send_enterprise_trap_vars (trap=3D-1, specific=3D-1,=20
enterprise=3D0xff392a64,
    enterprise_length=3D10,=20
vars=3D0x2209320) at agent_trap.c:797
#6  face=3DArial>0xff29d0bc in=
send_eventTrap_trap ()=20
at ssg/ssg.c:1349 <------ Here we called=20
send_v2trap
style=3D"FONT-WEIGHT: bold">
#7  0xff15d940 in=
run_alarms () at=20
snmp_alarm.c:251    


=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book=
Antiqua'">[Santhosh] Are=20
you adding any OID to trap var bind which is defined as/under table?=
 To=20
isolate the issue remove table varbinds in trap PDU and see the memory=
usage.=20


=3D2> style=3D"FONT-SIZE: 11pt; COLOR: blue; FONT-FAMILY: 'Book Antiqua'">If with=
out=20
any table OID added in the trap memory size reduced, then the issue is with=
the=20
dataset (you might have used mib2c.create-dataset.conf template to=
implement=20
your private table).



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 12pt"> 



style=3D"FONT-SIZE: 10pt; FONT-FAMILY:=
Arial">Thanx,



style=3D"FONT-SIZE: 10pt; FONT-FAMILY:=
Arial">Devi.U


style=3D"FONT-SIZE: 12pt"> 


face=3D"Times New Roman" size=3D3>



size=3D2> style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY:=
Tahoma">From:
face=3DTahoma size=3D2> Tahoma">=20
santhosh.sundarasamy@wipro.com=20
[mailto:santhosh.sundarasamy@wipro.com]
style=3D"FONT-WEIGHT: bold">Sent:
Wed 3/14/2007 12:08=
PM
style=3D"FONT-WEIGHT: bold">To: Devi U;=20
net-snmp-coders@lists.sourceforge.net
style=3D"FONT-WEIGHT: bold">Subject: RE: how to purify net-snmp=
=20
code



style=3D"FONT-SIZE: 12pt"> 


style=3D"FONT-SIZE:=
10pt">Devi,
       =20
After freeing varbind, usage should decrease; PDU is already freed in=20
netsnmp_send_traps() itself ( invoked by send_v2trap). Sending trap or=
inform?=20
Are you receiving the traps in trapd?  Cross check the API usage in=
other=20
implementations (grep send_v2trap `find . -name=20
"*.c"`)

        We used method=
similar=20
to apps/snmptrap.c and there is no memory usage raised / leaks. Pls refer=20
snmptrap.c file for session creation &=20
deletion.

-
Santhosh

_____________________________________=
___
From:=20
Devi U [ href=
=3D"mailto:udevi@TechMahindra.com">mailto:udevi@TechMahindra.com]
Se=
nt:=20
Tuesday, March 13, 2007 7:30 PM
To: SANTHOSH S (WT01 - Broadband=
Networks);=20
net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify=
net-snmp=20
code

 
Santhosh,
 
Thanx for ur immediate=20
response.
followed the same example -=20
/examples/notification.c
 
snmp_free_varbind is called in our=20
code after send_v2trap().
 
In top output, i can see the=
size=20
remains same even after snmp_free_varbind() is called.should size decrease=
after=20
free is called?
 
For every 100 msec, callback will be=20
called,snmp_varlist_add_variable() is used to store the=
variables and=20
send_v2trap() is called for sending a single trap.
 
I dont know=
how=20
to create session / send all traps in a single=20
session.
 
Thanx,
Devi.U
_________________________________=
_______
From:=20
santhosh.sundarasamy@wipro.com [ href=
=3D"mailto:santhosh.sundarasamy@wipro.com">mailto:santhosh.sundarasamy@wipr=
o.com]
Sent:=20
Tue 3/13/2007 7:03 PM
To: Devi U;=20
net-snmp-coders@lists.sourceforge.net
Subject: RE: how to purify=
net-snmp=20
code

Hi Devi,
        The=
increase=20
shown in top is memory usage by the application; all increased bytes might=
have=20
not been leaked.

        You need=
to=20
free the varbinds after sending each=20
trap/inform.
       =20
       =20
snmp_free_varbind(notification_vars);
     &nbs=
p; =20
refer: href=
=3D"http://www.net-snmp.org/dev/agent/notification_8c-example.html">http://=
www.net-snmp.org/dev/agent/notification_8c-example.html=20
 

        Print the "top"=
output=20
after freeing varbind and check the=20
usage.

        Are you using=
single=20
session to send all trap/inform or creating session before sending each=20
inform/trap?

-
Santhosh
______________________________________=
__
From:=20
Devi U [ href=
=3D"mailto:udevi@TechMahindra.com">mailto:udevi@TechMahindra.com]
Se=
nt:=20
Tuesday, March 13, 2007 6:44 PM
To:=20
net-snmp-coders@lists.sourceforge.net
Cc: SANTHOSH S (WT01 - Broadband=20
Networks)
Subject: RE: how to purify net-snmp=20
code

Hi,
 
thanx santhosh..
I am able to purify the=20
code..
 
I feel that memory leak is there when send_v2trap=
is=20
called, but i am not getting any MLK/PLK  in=
traces
 
top=20
display:
 
26760 root      =20
1   0   19 9248K 5608K run    =20
0:01  0.30% snmpd
 
top display after a trap is sent =3D=3D=
=3D> for=20
each  trap sent there is a increase of 40K in SIZE and goes upto=20
50M.
26760 root       1  =20
0   19 9288K 5648K run     0:01  0.31%=20
snmpd
 
we are using net-snmp version=
5.3.0.1.
 
whether=20
above increase in SIZE is memory=20
leak?
 
Thanx,
Devi.U


The information contained in=
this=20
electronic message and any attachments to this message are intended for the=
=20
exclusive use of the addressee(s) and may contain proprietary, confidential=
or=20
privileged information. If you are not the intended recipient, you should=
not=20
disseminate, distribute or copy this e-mail. Please notify the sender=20
immediately and destroy all copies of this message and any=20
attachments.

WARNING: Computer viruses can be transmitted via email.=
The=20
recipient should check this email and any attachments for the presence of=20
viruses. The company accepts no liability for any damage caused by any=
virus=20
transmitted by this email.

www.wipro.com


The information=
=20
contained in this electronic message and any attachments to this message=
are=20
intended for the exclusive use of the addressee(s) and may contain=
proprietary,=20
confidential or privileged information. If you are not the intended=
recipient,=20
you should not disseminate, distribute or copy this e-mail. Please notify=
the=20
sender immediately and destroy all copies of this message and any=20
attachments.

WARNING: Computer viruses can be transmitted via email.=
The=20
recipient should check this email and any attachments for the presence of=20
viruses. The company accepts no liability for any damage caused by any=
virus=20
transmitted by this=20
email.

www.wipro.com






=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D



Tech Mahindra, formerly Mahindra-British Telecom.



Disclaimer:



This message and the information contained herein is proprietary and=
confidential and subject to the Tech Mahindra policy statement, you may=
review at =3D"http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.co=
m/Disclaimer.html externally and =3D"http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.co=
m/Disclaimer.html internally within Tech Mahindra.



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=
=3D




The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you=
are not the intended recipient, you should not disseminate, distribute or=
copy this e-mail. Please notify the sender immediately and destroy all=
copies of this message and any attachments.



WARNING: Computer viruses can be transmitted via email. The recipient=
should check this email and any attachments for the presence of viruses.=
The company accepts no liability for any damage caused by any virus=
transmitted by this email.



www.wipro.com


=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D



Tech Mahindra, formerly Mahindra-British Telecom.



Disclaimer:



This message and the information contained herein is proprietary and=
confidential and subject to the Tech Mahindra policy statement, you may=
review at =3D"http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.co=
m/Disclaimer.html externally and =3D"http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.co=
m/Disclaimer.html internally within Tech Mahindra.



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=
=3D


------_=_NextPart_001_01C772DA.787ED080--



--===============1317354946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
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?p...rge&CID=DEVDEV
--===============1317354946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============1317354946==--