Joined: 04 Oct 2007 Posts: 1250 Location: Ohio USA
Posted: Mon Nov 30, 2009 14:53 Post subject:
I am finding that SNMP is not working in my builds, even though it is enabled in the .config when compiling. _________________ (04/15/13) mega - 21286
4x WRT54G-TM
I am finding that SNMP is not working in my builds, even though it is enabled in the .config when compiling.
Is it possible that some modules are removed by an extraneous command in your install script itself? It gets rather hairy because there are scripts that call other scripts and/or run make commands which in turn may call more scripts. Unexpected results are easy to encounter.
For example, I have just determined that in the install_mini.v24_2.sh on the first page of this thread, the following line
Code:
./make_kernel.v24_2.sh
has no added value that I can tell. These lines in that make_kernel script,
Code:
./loader-0.02/lzma e ../src/linux/brcm/linux.v24_2/arch/mips/bcm947xx/compressed/piggy vmlinuz
./loader-0.02/lzma e ../src/linux/brcm/linux.v24_2/arch/mips/bcm947xx/compressed/piggy vmlinuzmicro
refer to vmlinuz and vmlinuzmicro that will be placed in the DD-WRT/opt directory but will be ignored in the subsequent command,
I am not pointing fingers here. On a project of this size, things like this are bound to happen and they can be hard to find when they cause no adverse effect.
-a log addresses
-A append to the logfile rather than truncating it
-c FILE read FILE as a configuration file
-C do not read the default configuration files
-d dump sent and received SNMP packets
-D turn on debugging output
-f do not fork from the shell
-g GID change to this numeric gid after opening
transport endpoints
-h, --help display this usage message
-H display configuration file directives understood
-I [-]INITLIST list of mib modules to initialize (or not)
(run snmpd with -Dmib_init for a list)
-l FILE print warnings/messages to FILE
(by default FILE=/dev/null)
-L print warnings/messages to stdout/err
-P FILE store process id in FILE
-q print information in a more parsable format
-r do not exit if files only accessible to root
cannot be opened
-s log warnings/messages to syslog
-S d|i|0-7 set syslog facility to LOG_DAEMON (d), LOG_INFO (i)
or LOG_LOCAL[0-7] (default LOG_DAEMON)
-u UID change to this uid (numeric or textual) after
opening transport endpoints
-v, --version display version information
-V verbose display
On my 1 WRT54G-TM that I am running "DD-WRT v24-sp2 (11/25/09) std-nokaid - build 13309M NEWD Eko" on and snmp enabled and configured, it shows snmp running in "top" and works fine.
Code:
PID PPID USER STAT VSZ %MEM %CPU COMMAND
22676 1 root S 2220 7.5 0.0 snmpd -c /var/snmp/snmpd.conf
On my other WRT54G-TM that I built the firmware for, snmp is configured and enabled, but it does not show that it is running under "top". If I manually try starting it with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp" it does not start. _________________ (04/15/13) mega - 21286
4x WRT54G-TM
You might set some symbolic links to tmp. E.g. I do know from samba that it want to keep books about the netbios names it finds and stores information /etc/samba/secrets.tdb (or similar). If you create a symbolic link /etc/samba/secrets.tdb that targets to /tmp/etc/samba/secrets.tdb things should work. You can find such open files by looking in /proc/*/fd (e.g. ls -l /proc/*/fd | grep snmp ) in your router running smnp. If you have a running optware you can use the command lsof, and it will give you even more information.
I have not tried a things for this special way, I used this to prevent usb-disc access of samba so that the disc can spin down.
Joined: 04 Oct 2007 Posts: 1250 Location: Ohio USA
Posted: Tue Dec 01, 2009 23:34 Post subject:
gruenesAlien wrote:
You might set some symbolic links to tmp.
Thanks for the tip. I do see that /tmp/snmp-persist/snmpd.conf does not exist on my custom build, which contains the following:
Code:
#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
#
This file is not a symbolic link on my router running the Eko build.
I have manually created the file with these contents but it still does not start with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp". I will have to go through both routers and compare the folder contents to see what else is missing from my custom build for snmp. _________________ (04/15/13) mega - 21286
4x WRT54G-TM
Thanks for the tip. I do see that /tmp/snmp-persist/snmpd.conf does not exist on my custom build, which contains the following:
Code:
#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
#
This file is not a symbolic link on my router running the Eko build.
I have manually created the file with these contents but it still does not start with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp". I will have to go through both routers and compare the folder contents to see what else is missing from my custom build for snmp.
try removing '--disable-debugging' from line 17 of src/router/rules/snmp.mk
some others just in case. you would want to use the > lines.
Code:
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openssl.mkb openssl.mk
17c17
< ifeq ($(CONFIG_MADWIFI),y)
---
> #ifeq ($(CONFIG_MADWIFI),y)
20c20
< endif
---
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openvpn.mkb openvpn.mk
14,16c14,16
< ifneq ($(CONFIG_MADWIFI),y)
< rm -f openssl/*.so*
< endif
---
> #ifneq ($(CONFIG_MADWIFI),y)
> # rm -f openssl/*.so*
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff sputnik.mkb sputnik.mk
10c10
< if test -e "sputnik/Makefile"; then make -C sputnik; fi
---
> if test -d "sputnik/src"; then make -C sputnik; fi
13c13
< if test -e "sputnik/Makefile"; then make -C sputnik clean; fi
---
> if test -d "sputnik/src"; then make -C sputnik clean; fi
Joined: 04 Oct 2007 Posts: 1250 Location: Ohio USA
Posted: Thu Dec 03, 2009 8:55 Post subject:
rkozola wrote:
some others just in case. you would want to use the > lines.
Code:
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openssl.mkb openssl.mk
17c17
< ifeq ($(CONFIG_MADWIFI),y)
---
> #ifeq ($(CONFIG_MADWIFI),y)
20c20
< endif
---
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openvpn.mkb openvpn.mk
14,16c14,16
< ifneq ($(CONFIG_MADWIFI),y)
< rm -f openssl/*.so*
< endif
---
> #ifneq ($(CONFIG_MADWIFI),y)
> # rm -f openssl/*.so*
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff sputnik.mkb sputnik.mk
10c10
< if test -e "sputnik/Makefile"; then make -C sputnik; fi
---
> if test -d "sputnik/src"; then make -C sputnik; fi
13c13
< if test -e "sputnik/Makefile"; then make -C sputnik clean; fi
---
> if test -d "sputnik/src"; then make -C sputnik clean; fi
Nice. Thanks for these tips. I have also found that I need to run make clean prior to make configure in src/router after making changes to the .config file. _________________ (04/15/13) mega - 21286
4x WRT54G-TM
Joined: 04 Oct 2007 Posts: 1250 Location: Ohio USA
Posted: Thu Dec 03, 2009 15:13 Post subject:
Going to put off fixing openvpn for now and work on setting my default nvram settings in src/router/services/sysinit/sysinit.c _________________ (04/15/13) mega - 21286
4x WRT54G-TM
Is there any easy way to see the output produced by the install_x.v24_2.sh script? I always get an error but can't scroll up because some program always clears the console. _________________ Routers:
WRT54GS v6: DD-WRT v24-sp2 14438 NEWD2 micro_plus with modified CFE
Asus WL-500gP v2: Tomato USB k26 beta 20
WRT120N (No dd-wrt/openwrt yet...)
At 14, the youngest DD-WRT User