Re:Re: how to configure net-snmp on uclinux(fork & vfork)

黎明傲子 <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>


在2010-04-06 14:12:20,"Bart Van Assche" <[email protected]> 写道:

2010/4/6 黎明傲子 <[email protected]>


I'm an embedded software engineer,recently I'm porting net-snmp on uclinux,my cross-compilation tools is arm-elf-, the configuration as follows:

 

./configure --build=i386-linux --host=arm-elf --target=arm-uclinux --disable-manuals --disable-applications --disable-scripts -enable-debugging --disable-testing --with-endianness="little" --with-cc="arm-elf-gcc" --with-ar="arm-elf-ar" --prefix="/home/uClinux/AMLY/net-snmp-5.2.5.1/install" --with-persistent-directory="/var/net-snmp" --with-default-snmp-version="3" --with-sys-contact="contact" --with-sys-location="location" --enable-shared="no" --enable-mini-agent --with-ldflags="-elf2flt -Bstatic"

 

My build process is successful,but when I run snmpd on my board(CPU:S3C2510)failed,as follows:

 

snmpd
[ ... ]

 

As I know that uClinux does not implement fork(),so I modified the file $(net-snmp-5.2.5.1)/ include/net-snmp/net-snmp-config.h add a line #define fork vfork, however,I also can’t run snmpd on my board and deadlocks happened,so I hope you can give my some advices about this,thanks!


Have you already tried to pass flag -f to snmpd ? That way snmpd doesn't invoke fork() or vfork(). You can start snmpd e.g. as follows if your shell supports "&":

snmpd -f &

Bart. 

 

Daer Bart:

I’m very glad to receive your reply, thanks! 

As your recommendation, I tried, In that way ,I did can only see one snmpd process, but how I can pass flag –c to read my configuration file snmpd.conf  meanwhile ? 

 

if I do like these:

snmpd –f &

Through the ps command I did can only see one snmpd process but Mib browser can’t access my board.

 

snmpd –f

the snmpd process would be blocked, like deadlocks,has no improvement as before. 

 

snmpd –f –c /mnt/config/snmpd.conf &

Through the ps command I can’t see the snmpd process and Mib browser  also can’t access my board.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.