Den 17-02-2012 01:26, lilier wei skrev:
> Niels,
> Thank you for your help. I think I found the problem. I opened a log
> file but didn't close it. When I opened too many, system ran out of
> resources.

Good you found the problem.

WRT gdb, you shoud add the -f option to keep snmpd from forking and 
daemonizing when debbuging.

> On Thu, Feb 16, 2012 at 2:59 PM, lilier wei <lilier....@gmail.com
> <mailto:lilier....@gmail.com>> wrote:
>
>     My usage is simple.
>     Here is my conifure:
>     ./configure --with-mib-modules= myNotif\
>     --disable-applications --with-defaults \
>     --disable-manuals \
>     --disable-scripts \
>     --disable-debugging \
>     --disable-snmptrapd-subagent \
>     --host=powerpc-linux \
>     --target=powerpc-linux \
>     --without-openssl  \
>     --with-endianness=big \
>     --with-ld= path-to-ld\
>     --with-cflags="-static -O2 -lpthread -lrt"  \
>     --with-cc=path-to-gcc \
>     --with-linkcc=path-to-linkcc\
>     --with-ar=path-to-ar \
>     --disable-des --disable-privacy --disable-md5  \
>     --disable-shared  --enable-debugging
>     I only use snmpd to send notifications.  So in myNotif.c file, I use
>     snmp_alarm_register registered a callback function to periodicly
>     check if there are traps that need to be sent and then send it.  To
>     do this I have to link in some of my code so snmpd can communicate
>     with other process.
>     What I saw is after about 20 minutes, snmpd just exited without any
>     warnings. I don't see any log in the log file.
>     I tried to use GDB to debug it, but looks like the main process
>     exited shorted after it spawned a deamon snmpd which I don't know
>     how to debug yet.
>     How can I debug the problem?

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to