Hello Nunya,
Did you try to began from using a simple snmpd.conf?
In my case, with CF 5274, snmp crashed during default start-up too.
For fix it I made a simple config:
syslocation NY, USA
syscontact t...@test.com
rwcommunity public
With next command to start-up:
snmpd -Lo -c /mnt/snmp/snmpd.conf -d -C -f
Without crashing it was a good way to continue working.
Since your SNMP crashing during preparing environment I expect that
executable is fine.
But if you want - I could send you snmpd pre-compiled binary which you
could try on your device.
01.08.2011 22:28, nunya si writes:
Hello all!
I recently upgraded my uclinux distribution from ~2006 build to the
20110210 build. Fantastic improvements I must say!!
The only issue I have is that I cannot get net-snmp to run to save my
life. The version that came with the distribution would not compile
until I made some modifications in the source itself that revolved
around threads. After that it would crash and exit...
Long story short I moved to net-snmp version 5.6.1.1 (which, in the
end, has what appears to be the exact same issue)
I cross compile net-snmp using the below command:
CC="ucfront-gcc m68k-uclinux-gcc -m5200 -DCONFIG_COLDFIRE -Os -g
-fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED
-msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__"
LDFLAGS="-Wl,-elf2flt -Wl,-move-rodata -msep-data" LIBS="" \
../configure --host=m68k-uclinux --prefix= --with-endianness=big
--enable-shared=no --enable-mini-agent --disable-applications
--disable-manuals --disable-mib-loading --with-openssl=internal
--enable-debugging --with-defaults;
After which I run it via "snmpd -f -Cc /tmp/snmp.conf"
snmp.conf looks like this:
agentaddress 192.168.111.99
rwuser private
rouser public
trapcommunity private
trap2sink 192.168.111.1
The debug output yields this (after about 1000 other lines):
...
...
read_config: reading normal configuration tokens
trace: read_configs_optional(): ../../snmplib/read_config.c, 969:
read_configs_optional: reading optional configuration tokens for snmpd
trace: read_configs_optional(): ../../snmplib/read_config.c, 981:
read_config:opt: Reading optional config file: "/tmp/snmp.conf"
trace: read_config(): ../../snmplib/read_config.c, 780:
read_config:file: Reading configuration /tmp/snmp.conf (0)
trace: read_config(): ../../snmplib/read_config.c, 790:
9:read_config:line: /tmp/snmp.conf:1 examining: agentaddress
192.168.111.99
trace: read_config(): ../../snmplib/read_config.c, 927:
read_config:line: /tmp/snmp.conf:1 examining: agentaddress 192.168.111.99
trace: run_config_handler(): ../../snmplib/read_config.c, 525:
read_config:parser: Found a parser. Calling it: agentaddress /
192.168.111.99
trace: snmpd_set_agent_address(): ../../agent/agent_read_config.c, 185:
snmpd_ports: port spec: 192.168.111.99
trace: netsnmp_ds_set_string(): ../../snmplib/default_store.c, 280:
netsnmp_ds_set_string: Setting APP:2 = "192.168.111.99"
trace: run_config_handler(): ../../snmplib/read_config.c, 535:
read_config:parser: Returned from call on agentaddress / 192.168.111.99
trace: read_config(): ../../snmplib/read_config.c, 790:
9:read_config:line: /tmp/snmp.conf:2 examining: rwuser private auth
trace: read_config(): ../../snmplib/read_config.c, 927:
read_config:line: /tmp/snmp.conf:2 examining: rwuser private auth
trace: run_config_handler(): ../../snmplib/read_config.c, 525:
read_config:parser: Found a parser. Calling it: rwuser / private auth
And then dies. I added a check that would print a "Returned from
call..." after this jump, but as you can see, it never returns from
the call to register the rwuser. I have tried running this with
gdbserver with no luck.
In actuality I have about 3 days in trying different things and
tracking function calls around with no luck.
The really odd thing is that if I take my OLD statically compiled snmp
from the old ~2006 build of uclinux it seems to die around the same
place. Is there some kind of kernel option that I need to enable that
was enabled by default years ago?
I am hoping that someone out there has some ideas that they can share
to help me either solve the problem or give me an idea that I can use
to solve the problem. As you might expect snmpd works just fine when
not cross compiled.
My platform is the freescale 5275
uClinux version 2.6.37-uc0
gcc version 4.2.4
Regards,
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev