r...@ubuntu:/usr/share/snmp/mibs# snmpd -f -Le -Duit,dlmod 6161
registered debug token uit, 1
registered debug token dlmod, 1
dlmod: register mib
dlmod: dlmod_path: /usr/lib/snmp/dlmod
dlmod: dlmod_create_module
dlmod: dlmod_load_module uit: /usr/share/snmp/mibs/uit.so
NET-SNMP version 5.4.1
  
  
 command stop there,and what  should I do next?
  
  
   ------------------ 原始邮件 ------------------
  发件人: "Dave Shield"<d.t.shi...@liverpool.ac.uk>;
 发送时间: 2009年11月16日(星期一) 下午4:39
 收件人: "飞飞"<chenyapu1...@qq.com>; 
 抄送: "net-snmp-users"<net-snmp-users@lists.sourceforge.net>; 
 主题: Re: About Dynamically Load my MIB

  
    [ First - *please* don't mail me privately, without copying
     any responses to the mailing list.  I don't have the time
     or inclination to offer private, unpaid, SNMP consultancy.
     Keep discussions to the list, where others can both learn
     and offer advice.  Thanks.   ]


2009/11/16 飞飞 <chenyapu1...@qq.com>:
> r...@ubuntu:/usr/share/snmp/mibs# snmpd -f -L -Duit,dlmod
> registered debug token uit, 1
> registered debug token dlmod, 1
> dlmod: register mib
> dlmod: dlmod_path: /usr/lib/snmp/dlmod
> /* I really have no idea what its meaning */

This is the default directory where the agent will look for
.so modules to load.   But you specify a full path below,
so don't need to worry about this.


> dlmod: dlmod_create_module
> dlmod: dlmod_load_module uit: /usr/share/snmp/mibs/uit.so

No is error displayed here, so it looks as if the module is
being loaded successfully.


> /etc/snmp/snmpd.conf: line 430: Warning: Unknown token: mibs.

The "mibs" directive is typically aimed at client applications,
and belongs in the file "snmp.conf", not the agent-specific file.


> Error opening specified endpoint ""
> Server Exiting with code 1

Typically that would indicate that you're running the
agent as a non-root user, and trying to open the standard
(privileged) port.   Which fails.

But given that you seem to be running this as root,
my suspicion is that you're already running an SNMP
agent, listening on this port.

Either stop this standard agent before running your
new one, or run your testing on a different port
e,g:
    snmpd -f -Le -Duit,dlmod   6161


> /* /etc/snmp/snmpd.conf: line 430 is: mibs +ALL is anything wrong? */

This directive belongs in snmp.conf


Dave


> I modified a Makefile file for my own use,as follows:
>
> CC=gcc
> OBJS1=snmpdemoapp.o
> OBJS2=example-demon.o uit.o
> OBJS3=asyncapp.o
> TARGETS=example-demon snmpdemoapp asyncapp
> CFLAGS=-I. `net-snmp-config --cflags`
> BUILDLIBS=`net-snmp-config --libs`
> BUILDAGENTLIBS=`net-snmp-config --agent-libs`
> # shared library flags (assumes gcc)
> DLFLAGS=-fPIC -shared
> all: $(TARGETS)
> snmpdemoapp: $(OBJS1
>  $(CC) -o snmpdemoapp $(OBJS1) $(BUILDLIBS)
> asyncapp: $(OBJS3)
>  $(CC) -o asyncapp $(OBJS3) $(BUILDLIBS)
> example-demon: $(OBJS2)
>  $(CC) -o example-demon $(OBJS2) $(BUILDAGENTLIBS)
> clean:
>  rm $(OBJS2) $(OBJS2) $(TARGETS)
> uit.so: uit.c Makefile
>  $(CC) $(CFLAGS) $(DLFLAGS) -c -o uit.o uit.c
>  $(CC) $(CFLAGS) $(DLFLAGS) -o uit.so uit.o
> Is anything wrong here?
>
> Alex

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to