RE: how to purify net-snmp code

2007-03-13 Thread santhosh.sundarasamy
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"`)

Re: Decrease execute times of get_first_data_point() when getBulk

2007-03-13 Thread Zhang Chuan
Thanks for useful advices. I have tried it but can not success in compile. 1.I use "mib2c -S cache=1 -c mib2c.iterate.conf portInfoTable" to generate the framework. 2.After compared the new framework with the old one, I got there are just minor difference between them. 3.I added the difference c

Re: how to purify net-snmp code

2007-03-13 Thread Wes Hardaker
> "DU" == Devi U <[EMAIL PROTECTED]> writes: DU> Hi, DU> Is it possible to purify the net-snmp code? DU> How to identify the memory leaks? FYI, using valgrind is documented at: http://www.net-snmp.org/wiki/index.php/Debugger -- Wes Hardaker Sparta, Inc.

Re: Still having trouble with nstAgentPluginObject tutorial...

2007-03-13 Thread Russell Markus
Thanks Adam. We had to reinstall Fedora to solve a different problems and I forgot to put the mib back. On 3/13/07, Adam Bell <[EMAIL PROTECTED]> wrote: > You have to load the mib if you want to use the name - you can use the OID > as is without the name. > Info in the tutorial to load the MIB fi

Re: external application resquests snmpd to send a trap ?! how-to ?

2007-03-13 Thread Magnus Fromreide
On tis, 2007-03-13 at 12:36 +, Joao Miguel Ferreira wrote: > Hello all, > > I've posted this question on the users list, but did not find the most > correct approach to do this. My problem is simple: my application needs > to request snmpd to send a trap. > > Is there an API to ask the agent

RE: how to purify net-snmp code

2007-03-13 Thread Devi U
Santhosh, Thanx for ur immediate response. followed the same example - /examples/notification.c snmp_free_varbind is called in our code after send_v2trap(). In top output, i can see the size remains same even after snmp_free_varbind() is called.should size decrease after free is called?

RE: how to purify net-snmp code

2007-03-13 Thread santhosh.sundarasamy
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/ag

RE: how to purify net-snmp code

2007-03-13 Thread Devi U
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 tra

external application resquests snmpd to send a trap ?! how-to ?

2007-03-13 Thread Joao Miguel Ferreira
Hello all, I've posted this question on the users list, but did not find the most correct approach to do this. My problem is simple: my application needs to request snmpd to send a trap. Is there an API to ask the agent to send a trap (I do not mean an API to send the trap... I mean an API to ask

Re: IP don't fragment bit set in get-response

2007-03-13 Thread Dave Shield
On 09/03/07, Dominique bastien <[EMAIL PROTECTED]> wrote: > I face a little problem here with the DF bit in IP. > Can I disable this default > setting by configuration or I need to find a hack in > the code? You'd need to hack the code. Dave -

Re: query regarding SNMP

2007-03-13 Thread Dave Shield
On 09/03/07, nishant singh <[EMAIL PROTECTED]> wrote: > I have to get device information(Like its name and location) > using SNMP in c++ environment(In windows)... > Plz can anybody send me some sample codes in C++ regarding > how to create SNMP packets,send and How to get the information.. Pleas

Re: problem sending traps from c code

2007-03-13 Thread Dave Shield
On 09/03/07, maciej_golas <[EMAIL PROTECTED]> wrote: > I want to write a subagent that will sent a trap as a response to SET > command. There is an example of exactly this behaviour in the file 'agent/mibgroup/examples/example.c' See the blocks entitled "EXAMPLETRIGGERTRAP" and "EXAMPLETRIGGE

Re: Decrease execute times of get_first_data_point() when getBulk

2007-03-13 Thread Dave Shield
On 09/03/07, Zhang Chuan <[EMAIL PROTECTED]> wrote: > Since I want to get the newest data from system when a GETBULK message come > in. I have an init_table() function in get_first_data_point(). The > init_table() function get the data from system by TCP and set them to a > given dataset. Then get_

Re: Trying to install non-root, fails because it tries to install Perl modules

2007-03-13 Thread Thomas Anders
Mark Atwood wrote: > The install died with > ... > Warning: You do not have permissions to install into > /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi at > /usr/lib/perl5/5.8.8/ExtUtils/Install.pm line 114. > mkdir > /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/N