2008-02-22 00:16:08     Enabling NET-SNMP in uClinux

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2008-02-22 00:16:08     Enabling NET-SNMP in uClinux

Manu AS (INDIA)

Message: 51468    Hi All,

 

I am trying to configure Net-SNMP agent in uClinux. I have tried to configure the /user/net-snmp/, but I was not successful. So, I tried downloading the net-snmp-5.0.8 and replaced the existing net-snmp. I have run the ./configure in the /user/net-snmp/ folder. I used the following configure command:

 

./configure --target=bfin \

--with-cc=bfin-uclinux-gcc \

--with-ar=bfin-uclinux-ar --with-endianness=little \

--enable-mini-agent --disable-debugging \

--includedir="/home/manu/uClinux-dist/uClibc/include" \

--without-kmem-usage --with-transports="UDP" \

--with-mib-modules="mibII snmpv3mibs notification target" \

--with-out-mib-modules="ucd<wbr></wbr>_snmp agent_mibs agentx utilities"

 

I am using the processor Blackfin561. Configure is not giving any error. Butafter that, when I build the uClinux-dist, I am getting the following error:

 

make[2]: Entering directory `/home/manu/uClinux-dist/user<wbr></wbr>/net-snmp'

bfin-uclinux-gcc -E -Iinclude -I./include -I./agent/mibgroup -I. -I. -DDONT_INC_STRUCTS -DBINDIR=/usr/local/bin -x c ./sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript

echo 's#DATADIR#/usr/local/share#g' >> sedscript

echo 's#LIBDIR#/usr/local/lib#g' >> sedscript

echo 's#BINDIR#/usr/local/bin#g' >> sedscript

echo 's#PERSISTENT_DIRECTORY#/var<wbr></wbr>/net-snmp#g' >> sedscript

echo 's#SYSCONFDIR##g' >> sedscript

/bin/sed -f sedscript ./EXAMPLE.conf.def > EXAMPLE.conf

making all in /home/manu/uClinux-dist/user<wbr></wbr>/net-snmp/snmplib

make[3]: Entering directory `/home/manu/uClinux-dist/user<wbr></wbr>/net-snmp/snmplib'

/bin/sh ../libtool  --mode=compile bfin-uclinux-gcc -I../include -I../include -I. -I.. -I. -I./..  -g -O2 -D  -c -o snmp_client.lo snmp_client.c

mkdir .libs

bfin-uclinux-gcc -I../include -I../include -I. -I.. -I. -I./.. -g -O2 -D -c snmp_client.c  -fPIC -DPIC -o .libs/snmp_client.lo

<command line>:1:1: macro names must be identifiers

make[3]: *** [snmp_client.lo] Error 1

make[3]: Leaving directory `/home/manu/uClinux-dist/user<wbr></wbr>/net-snmp/snmplib'

make[2]: *** [subdirs] Error 1

make[2]: Leaving directory `/home/manu/uClinux-dist/user<wbr></wbr>/net-snmp'

make[1]: *** [all] Error 2

"make.out" 802L, 47571C

 

 

Can some body tell me please where I am doing the mistake.

 

Best Regards,

 

Manu

QuoteReplyEditDelete

 

 

2008-02-22 00:55:51     Re: Enabling NET-SNMP in uClinux

Mike Frysinger (UNITED STATES)

Message: 51470    why would you attempt to build version 5.0.8 when the version in the tree is 5.2.1 ?  if the newer version doesnt work, then the older one probably wont as well

 

the reason for your error most likely is the configure failed to generate flags properly.  you'd have to dig through the build system to find out what wasnt set properly.

QuoteReplyEditDelete

 

 

2008-02-25 01:14:08     Re: Enabling NET-SNMP in uClinux

Manu AS (INDIA)

Message: 51576   

 

Hi All,

 

I am able to resolve the build problem. Now, I am trying to run the snmpd demon on the target board. and I am getting the following error. Can somebody tell me what is the problem?

 

root:~> snmpd -c /etc/snmpd.conf -f &

448

root:~> /bin/sed: cannot execute

/bin/sed: cannot execute

: bad directory

: cannot redirect shell command

mv: unable to rename `/.libs/448-lt-snmpd': No such file or directory

/bin/snmpd: error: /.libs/lt-snmpd does not exist

This script is just a wrapper for lt-snmpd.

See the libtool documentation for more information.

 

Any Inputs on the error?

 

Best Regards,

 

Manu

QuoteReplyEditDelete

 

 

2008-02-25 03:29:14     Re: Enabling NET-SNMP in uClinux

Yi Li (CHINA)

Message: 51580    Mike has suggested to try version 5.2.1. Did you get this error when running 5.2.1?

QuoteReplyEditDelete

 

 

2008-02-25 13:07:34     Re: Enabling NET-SNMP in uClinux

Mike Frysinger (UNITED STATES)

Message: 51604    you installed the wrong file ... as the error says, it isnt the real binary, just a wrapper script

 

you should use `make install` instead of trying to manually copy files

QuoteReplyEditDelete

 

 

2008-02-27 03:38:11     Re: Enabling NET-SNMP in uClinux

Manu AS (INDIA)

Message: 51699   

 

Hi All,

 

I am able to run the SNMP agent on the Blackfin Board. I am using the following command to run the agent:

 

root:/bin> snmpd  -c tst &

 

where tst is the community name.

 

On the SNMP manager, I am giving the command:

 

[root@babbage sbin]# snmpwalk -v 1 -c tst 10.201.179.222 system

End of MIB

 

And getting the End of MIB response.

 

What is the meaning of this?

 

I have some more doubts:

 

1. Also I want to know whether I have to do some thing manually to create MIB on the agent side? If so, how to do it?

 

2. Where exactly I have to put the snmpd.conf file in the agent side(Blackfin Board)?

 

3. Is it necessary to run the ./configure, make and make install in /uClinux-dist/user/net-snmp/ folder? or all this will be taken care when I build uClinux-dist by enabling snmpd and net-snmp through make menuconfig?

 

Any help will be greatly appreciated.

 

Best Regards,

 

Manu.

QuoteReplyEditDelete

 

 

2008-02-27 03:46:28     Re: Enabling NET-SNMP in uClinux

Mike Frysinger (UNITED STATES)

Message: 51700    we are not familiar with SNMP let alone the NET-SNMP let alone experts on the topic ... if you are wondering about the output from the net-snmp package, you should ask on the net-snmp homepage (mailing lists/forums/whatever)

QuoteReplyEditDelete

 

 

2008-02-27 06:43:06     Re: Enabling NET-SNMP in uClinux

Manu AS (INDIA)

Message: 51731   

 

Hi All,

 

In addition to the above problem, I am also getting the following error when I try to do a snmpget from SNMP Manager(Linux PC) to SNMP agent (Blackfin-561 Board):

 

[manu@babbage sbin]$ snmpget -v1 -c tst 10.201.179.64 system.sysContact.0

Error in packet

Reason: (noSuchName) There is no such variable name in this MIB.

Failed object: SNMPv2-MIB::sysContact.0

 

Any idea what is the problem?

 

Regards,

 

Manu

QuoteReplyEditDelete

 

 

2008-02-27 11:12:14     Re: Enabling NET-SNMP in uClinux

Robin Getz (UNITED STATES)

Message: 51746    Manu:

 

Like Mike suggested, if you ask at:

  net-snmp.sourceforge.net/support/contacts.html

 

you might get some better help, since we are not SNMP experts, and they are.

 

Before that, I would check out:

  net-snmp.sourceforge.net/wiki/index.php/Tutorials

  net-snmp.sourceforge.net/docs/readmefiles.html

 

-Robin

QuoteReplyEditDelete

 

 

2008-03-18 04:18:26     Re: Enabling NET-SNMP in uClinux

Manu AS (INDIA)

Message: 52645   

 

Hi All,

 

Net-snmp 5.0.8 is working fine on Blackfin uClinux.

 

I have a question here.

 

In linux, all the MIB files are stored under /usr/local/share/snmp/mibs folder.

 

The snmpd demon gets the mib files from there.

 

Similarly, Where exactly we have to put the mib files in uClinux? and how to tell the demon where these files are stored?

 

 

 

Best Regards,

 

Manu

QuoteReplyEditDelete

 

 

2008-03-18 07:10:46     Re: Enabling NET-SNMP in uClinux

Mike Frysinger (UNITED STATES)

Message: 52686    what you're asking is not related to Linux or uClinux.  that is a build time option given to configure.  the snmpd daemon wants is however you configured it.  as for how to configure/setup the snmpd daemon, you should review the snmpd man pages and/or included documentation.

Attachments

    Outcomes