how to configure net-snmp on uclinux(fork & vfork)
黎明傲子 <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Dear All: 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 No log handling enabled - turning on stderr logging trace: main(): snmpd.c, 485: signal: registering SIGTERM signal handler trace: main( : snmpd.c, 489: signal: registering SIGINT signal handler trace: main(): snmpd.c, 496: signal: registering SIGUSR1 signal handler trace: main(): snmpd.c, 500: signal: registering SIGPIPE signal handler trace: netsnmp_ds_set_boolean(): default_store.c, 205: net nmp_ds_set_boolean: Setting APP:3 = 0/False trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:4 = -1 trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:5 = -1 trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:10 = 5 trace: netsnmp_ds_set_boolean(): default_store.c, 205: netsnmp_ds_set_boolean: Setting APP:1 = 0/False daemonize: deamonizing... daemonize: first fork returned -1. first fork failed (errno 22) in netsnmp_daemonize() Server Exiting with code 1 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! The following is the snmpd run information when I change fork() into vfork(); snmpd No log handling enabled - turning on stderr logging trace: main(): snmpd.c, 485: signal: registering SIGTERM signal handler trace: main(): snmpd.c, 489: signal: registering SIGINT signal handler trace: man(: snmpd.c, 496: signal: registering SIGUSR1 signal handler trace: main(): snmpd.c, 500: signal: registering SIGPIPE signal handler trace: netsnmp_ds_set_boolean(): default_store.c, 205: netsnmp_ds_set_boolean: Setting APP:3 = 0/False trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:4 = -1 trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:5 = -1 trace: netsnmp_ds_set_int(): default_store.c, 257: netsnmp_ds_set_int: Setting APP:10 = 5 trace: netsnmp_ds_set_boolean(): default_store.c, 205: netsnmp_ds_set_boolean: Setting APP:1 = 0/False daemonize: deamonizing... daemonize: child continuing trace: netsnmp_ds_set_boolean(): default_store.c, 205: netsnmp_ds_set_boolean: Setting LIB:11 = 1/True trace: netsnmp_register_handler(): agent_handler.c, 212: handler::register: Registering (::null) at .0 ……………………………………………….. trace: read_config_store(): read_config.c, 1254: read_config: storing: engineBoots 1 trace: read_config_store(): read_config.c, 1254: read_config: storing: oldEngineID 0x80001f8880c22000002e000000 trace: snmp_call_callbacks(): callback.c, 231: callback: END calling callbacks for maj=0 min=1 (5 called) trace: snmp_clean_persistent(): read_config.c, 1367: snmp_clean_persistent: cleaning snmpd files... trace: main(): snmpd.c, 924: signal: registering SIGHUP signal handler trace: netsnmp_send_traps(): agent_trap.c, 654: trap: send_trap 0 0 iso.3.6.1.4.1.8072.3.2.255 trace: snmp_call_callbacks(): callback.c, 205: callback: START calling callbacks for maj=1 min=6 trace: snmp_call_callbacks(): callback.c, 231: callback: END calling callbacks for maj=1 min=6 (0 called) trace: snmp_call_callbacks(): callback.c, 205: callback: START calling callbacks for maj=1 min=7 trace: snmp_call_callbacks(): callback.c, 231: callback: END calling callbacks for maj=1 min=7 (0 called) NET-SNMP version 5.2.5.1 trace: main(): snmpd.c, 1006: snmpd/main: We're up. Starting to process data. trace: snmp_sess_select_info(): snmp_api.c, 5827: sess_select: for all sessions: 5 3 sess_select: next alarm 7363736.7364100 sec sess_select: blocking:no session requests or alarms. trace: receive(): snmpd.c, 1145: snmpd/select: select( numfds=6, ..., tvp=(nil)) ------------------------------------------------------------------------------ Download Intel® 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