[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-users
Subject:    noSuchName error when querying agent for the new MIB added using
From:       Liou Beesun <beeliou () yahoo ! com>
Date:       2007-11-26 2:17:42
Message-ID: 690624.67969.qm () web54102 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

I am trying to add a table with new MIB into agent
running in Linux using mfd to create C files using
net-snmp 5.4.1. I read tutorial and FAQ several times.
But I still had "noSuchName" when I am trying to
querying the OID. Maybe I missed some steps. Can some
one give me hint? Thanks.
My steps were:
1. Add PRIVATE-MIB.txt into mibs directory.
2. Use env MIBS="+PRIVATE-MIB" ./mib2c -c
mib2c.mfd.conf priHostTable
   which created several C files.
3. Change the C files and copied these files into
directory
   agent/mibgroup/PRIVATE-MIB/priHostTable
4. Add agent/mibgroup/PRIVATE-MIB.h and
   agent/mibgroup/PRIVATE-MIB/priHostTable.h
   (Note: I tried to use lower case for private-mib, 
          but when running configure, it wanted upper
case PRIVATE-MIB.
5. run configure with 
   --with-mib-modules=PRIVATE-MIB
6. run make and make install
It generated snmpd. When I ran snmpd from target
machine and used snmpget to fetch the varaible, it did
not respond with what I changed in the code.

# snmpget -v1 -c testMib localhost
1.3.6.1.4.1.1616.5.1.1.101.2.1.2.1
Error in packet
Reason: (noSuchName) There is no such variable name in
this MIB.
Failed object: PRIVATE-MIB::priHostOperationalState.1

When I queried sysContact.0, it responded what I
changed. So I know agent contained some of my change.
When I use objdump for sbin/snmpd, I did not see the
new table I added.
I checked the Makefiles in agent and agent/mibgroup,
they contain PRIVATE-MIB.
I checked libnetsnmpmibs.a which contained the code I
added.
So the code should be directly compiled into agent.
I did not use subagent so every objects should be in
snmpd.
It seems the module was compiled but not linked into
target/sbin/snmpd.
I think I might miss some steps described in the
tutorial and FAQ.
But I could not figure out which steps were missing. I
appreciate it a lot if some one can provide me some
hints. Thanks.


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic