Re: snmpd: unknown token: master, agentxsocket
"Ling" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <02a901c76c4c$c560d3c0$7801a8c0@lingasus> |
Thanks, Dave,
I am using uClinux from snapgear. I didn't run "configure", I just ran the makefile comes with this package. I just set the flag CONFIG_USER_NETSNMP_SNMPD for snmpd and CONFIG_USER_NETSNMP_APPS for snmp app. mini-snmpd is disabled. I can use snmpget to get system.sysUpTime ( the command is: snmpget -v 2c -c public 10.0.0.10 system.sysUpTime.0).
The "master" , "agentx" are not in the list if I run "snmpd -H". And when I use "kill" to kill the process, I got messeges like that " Received TERM or STOP signal... shutting down... snmpd: can't resolve symbol 'shutdown_proxy' ".
I also tried to compile my MIB into snmpd, I did add "--with-mib-modules=mymib" in the makefile, I can see my C files have been compiled, because I saw .o and .lo files of my mib. But I still cann't retrieve my mib by snmpget.
I am not sure if anything I did wrong.
Thanks,
Ling
The makefile:
#
# Makefile for net-snmp
#
#NET_SNMP_CFG = --host=i686-pc-linux --target=arm-linux --prefix=
NET_SNMP_CFG = --host=$(CROSS_COMPILE:-=) --prefix=
ifdef CONFIG_CPU_BIG_ENDIAN
NET_SNMP_CFG += --with-endianness=big
else
NET_SNMP_CFG += --with-endianness=little
endif
ifdef CONFIG_USER_NETSNMP_BUILDSTATIC
NET_SNMP_CFG += --enable-shared=no
NET_SNMP_LIB_EXT = a
NET_SNMP_EXE_DIR =
else
NET_SNMP_LIB_EXT = so
NET_SNMP_EXE_DIR = .libs/
endif
ifdef CONFIG_USER_NETSNMP_SNMPD
ifdef CONFIG_USER_NETSNMP_SNMPD_MINI
NET_SNMP_CFG += --enable-mini-agent
endif
else
NET_SNMP_CFG += --disable-agent
endif
ifndef CONFIG_USER_NETSNMP_APPS
NET_SNMP_CFG += --disable-applications
endif
ifndef CONFIG_USER_NETSNMP_MANUALS
NET_SNMP_CFG += --disable-manuals
endif
ifndef CONFIG_USER_NETSNMP_SCRIPTS
NET_SNMP_CFG += --disable-scripts
endif
#ifdef CONFIG_USER_NETSNMP_MIBS
#ifndef CONFIG_USER_NETSNMP_MIBLOADING
#NET_SNMP_CFG += --disable-mib-loading
#endif
#else
#NET_SNMP_CFG += --disable-mibs --disable-mib-loading
#endif
ifdef CONFIG_USER_NETSNMP_NOV1
NET_SNMP_CFG += --disable-snmpv1
endif
ifdef CONFIG_USER_NETSNMP_NOV2C
NET_SNMP_CFG += --disable-snmpv2c
endif
ifdef CONFIG_USER_NETSNMP_IPV6
ifndef CONFIG_IPV6
$(error CONFIG_IPV6 not defined)
else
NET_SNMP_CFG += --enable-ipv6
endif
endif
ifdef CONFIG_USER_NETSNMP_NOTRANSPORTS
NET_SNMP_CFG += --with-out-transports=$(CONFIG_USER_NETSNMP_EXTRANSPORTS)
endif
ifdef CONFIG_USER_NETSNMP_OPENSSL
ifndef CONFIG_LIB_LIBSSL
$(error CONFIG_LIB_LIBSSL not defined)
else
NET_SNMP_CFG += --with-openssl=$(ROOTDIR)/lib/libssl
endif
endif
ifdef CONFIG_USER_NETSNMP_OVRDEFAULTS
NET_SNMP_CFG
+= --with-default-snmp-version=$(CONFIG_USER_NETSNMP_DEFVERSION)
NET_SNMP_CFG += --with-sys-contact=$(CONFIG_USER_NETSNMP_DEFSYSCONTACT)
NET_SNMP_CFG += --with-sys-location=$(CONFIG_USER_NETSNMP_DEFSYSLOCATION)
NET_SNMP_CFG += --with-logfile=$(CONFIG_USER_NETSNMP_DEFLOGFILE)
NET_SNMP_CFG
+= --with-persistent-directory=$(CONFIG_USER_NETSNMP_DEFPERSISDIR)
NET_SNMP_CFG
+= --with-enterprise-oid=$(CONFIG_USER_NETSNMP_DEFENTERPRISEOID)
else
NET_SNMP_CFG += --with-defaults
endif
ifdef CONFIG_USER_NETSNMP_ADDMIBS
NET_SNMP_CFG += --with-mib-modules=$(CONFIG_USER_NETSNMP_ADDITIONALMIBS)
endif
all: build/Makefile
$(MAKE) xEXT=${NET_SNMP_LIB_EXT} xDIR=${NET_SNMP_EXE_DIR} -C build
build/Makefile: makefile
rm -fr build
mkdir build
chmod u+x configure
( \
cd build; \
CC="$(CC) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LDLIBS)" \
../configure $(NET_SNMP_CFG); \
)
romfs:
ifndef CONFIG_USER_NETSNMP_BUILDSTATIC
$(ROMFSINST) build/snmplib/.libs/libnetsnmp.so.5.2.1 /lib/libnetsnmp.so.5
$(ROMFSINST) build/agent/.libs/libnetsnmpagent.so.5.2.1
/lib/libnetsnmpagent.so.5
$(ROMFSINST) build/agent/.libs/libnetsnmpmibs.so.5.2.1
/lib/libnetsnmpmibs.so.5
$(ROMFSINST) build/agent/helpers/.libs/libnetsnmphelpers.so.5.2.1
/lib/libnetsnmphelpers.so.5
ifdef CONFIG_USER_NETSNMP_APPS_TRAPD
$(ROMFSINST) build/apps/.libs/libnetsnmptrapd.so.5.2.1
/lib/libnetsnmptrapd.so.5
endif
endif
ifdef CONFIG_USER_NETSNMP_SNMPD
$(ROMFSINST) build/agent/${NET_SNMP_EXE_DIR}snmpd /bin/snmpd
endif
ifdef CONFIG_USER_NETSNMP_APPS_BULKGET
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpbulkget /bin/snmpbulkget
endif
ifdef CONFIG_USER_NETSNMP_APPS_BULKWALK
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpbulkwalk /bin/snmpbulkwalk
endif
ifdef CONFIG_USER_NETSNMP_APPS_DELTA
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpdelta /bin/snmpdelta
endif
ifdef CONFIG_USER_NETSNMP_APPS_DF
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpdf /bin/snmpdf
endif
ifdef CONFIG_USER_NETSNMP_APPS_GET
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpget /bin/snmpget
endif
ifdef CONFIG_USER_NETSNMP_APPS_GETNEXT
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpgetnext /bin/snmpgetnext
endif
ifdef CONFIG_USER_NETSNMP_APPS_SET
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpset /bin/snmpset
endif
ifdef CONFIG_USER_NETSNMP_APPS_STATUS
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpstatus /bin/snmpstatus
endif
ifdef CONFIG_USER_NETSNMP_APPS_TABLE
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmptable /bin/snmptable
endif
ifdef CONFIG_USER_NETSNMP_APPS_TRANSLATE
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmptranslate /bin/snmptranslate
endif
ifdef CONFIG_USER_NETSNMP_APPS_TRAP
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmptrap /bin/snmptrap
endif
ifdef CONFIG_USER_NETSNMP_APPS_TRAPD
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmptrapd /bin/snmptrapd
endif
ifdef CONFIG_USER_NETSNMP_APPS_USM
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpusm /bin/snmpusm
endif
ifdef CONFIG_USER_NETSNMP_APPS_VACM
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpvacm /bin/snmpvacm
endif
ifdef CONFIG_USER_NETSNMP_APPS_WALK
$(ROMFSINST) build/apps/${NET_SNMP_EXE_DIR}snmpwalk /bin/snmpwalk
endif
ifdef CONFIG_USER_NETSNMP_APPS_NETSTAT
$(ROMFSINST) build/apps/snmpnetstat/${NET_SNMP_EXE_DIR}snmpnetstat
/bin/snmpnetstat
endif
clean:
rm -rf build
end of makfile...
----- Original Message -----
From: "Dave Shield" <[email protected]>
To: "Ling" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, March 21, 2007 7:20 PM
Subject: Re: snmpd: unknown token: master, agentxsocket
> On 21/03/07, Ling <[email protected]> wrote:
>> I am trying to implement snmpd on my embeded system. ...
>> But I got the following messages when I was running snmpd.
>>
>> "snmpd.conf: line 14: Warning: Unknown token: master."
>> "snmpd.conf: line 15: Warning: Unkonwn token: agentxsocket"
>
> How did you run "configure" when first building the agent?
>
> Dave
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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