How to test the Agent
Simon Chamlian <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAJTs9Vnbdo8fYU=VmK7HG9XLMuM7R31CWSgkMG0gkLZWzK8euw@mail.gmail.com> |
Hi, I launched the snmpd on the target with all config default values. Now I am trying to get a value of an OID without success. ----------------------------------------------------------------------- [root@M54418TWR snmp]# snmpget -v 2c -c public 172.27.42.191 IP-MIB::ipv4InterfaceTable.0 IP-MIB::ipv4InterfaceTable.0 = No Such Object available on this agent at this OID [root@M54418TWR snmp]# snmpget -v 2c -c public 172.27.42.191 RFC1213-MIB::ipInAddrErrors.0 RFC1213-MIB::ipInAddrErrors.0 = No Such Object available on this agent at this OID [root@M54418TWR snmp]# snmpget -v 2c -c public 172.27.42.191 RFC1213-MIB::ipInAddrErrors RFC1213-MIB::ipInAddrErrors = No Such Object available on this agent at this OID [root@M54418TWR snmp]# ----------------------------------------------------------------------- What am I doing wrong? Do I need a C application that connects to the agent (similar to open socket) and listens to incoming Get/Set command and replies back? Is there such test/template code on the network? Thanks, Simon On Wed, Nov 2, 2011 at 5:02 PM, Simon Chamlian <[email protected]>wrote: > The problem is that the net-snmp is compiled in installed using *LTIB* (*Linux > Target Image Builder*) , which build an image on an embedded target > (cross compiles). > > Therefore, I don't have the folder net-snmp-5.7.pre1/perl available, nor > have any compiler on the target board. > > Also, I have version 5.5 and not 5.7. > > > Note that I also tried: > > > > ---------------------------------------------------------------------------------- > > [root@M54418TWR snmp]# snmpd -a -c snmpd.conf,snmp.conf -d -Lf log.txt -r > > > > [root@M54418TWR snmp]# cat log.txt > > /usr/share/snmp/snmpd.conf: line 37: Warning: Unknown token: proc. > > /usr/share/snmp/snmpd.conf: line 53: Warning: Unknown token: master. > > snmpd.conf: line 37: Warning: Unknown token: proc. > > snmpd.conf: line 53: Warning: Unknown token: master. > > snmp.conf: line 26: Warning: Unknown token: mibdirs. > > snmp.conf: line 44: Warning: Unknown token: defaultport. > > snmp.conf: line 50: Warning: Unknown token: defversion. > > snmp.conf: line 56: Warning: Unknown token: defsecurityname. > > snmp.conf: line 62: Warning: Unknown token: defauthtype. > > snmp.conf: line 69: Warning: Unknown token: defauthpassphrase. > > Error opening specified endpoint "161" > > Server Exiting with code 1 > > > > ---------------------------------------------------------------------------------------------------------------- > > Basically, the snmpd does not recognize the tokens in snmpd.conf, which > was created using snmpconf. > > > Any hints? > > Thanks, > Simon > > > On Wed, Nov 2, 2011 at 1:42 AM, Venki <[email protected]>wrote: > >> ** >> Hi Simon, >> Please follow the following steps. >> >> [root@venkatesh perl]# cd net-snmp-5.7.pre1/perl >> [root@venkatesh perl]# make >> [root@venkatesh perl]# make install >> >> >> Please try this, >> >> >> Regards, >> Venki. >> >> >> Simon Chamlian wrote: >> >> Hi, >> >> I have an embedded board running Linux/net-snmp (TWR54418 from Freescale). >> >> I am trying to get the agent going on the eval board and create an >> application in C, to connect to the agent and return a value to a get/set >> command from a mib bowser running on PC. >> >> After reading several tutorials, I came accross, "MIB for Dummies". It >> suggests to create the C code from the MIB I have. >> >> But when I run it, I get the following error: >> >> [root@M54418TWR snmp]# mib2c -c mib2c.mfd.conf >> >> ERROR: You don't have the SNMP perl module installed. Please obtain >> this by getting the latest source release of the net-snmp toolkit from >> http://www.net-snmp.org/download/ . Once you download the source and >> unpack it, the perl module is contained in the perl/SNMP directory. >> See the README file there for instructions. >> >> [root@M54418TWR snmp]# >> >> >> I checked the downloads and I don't see any SNMP perl module? >> >> Note that Perl is installed on the eval board since snmpconf (perl >> script) works fine. >> >> Any hints will be greatly appreciated to help me out: >> 1) To launch the SNMP agent daemon >> 2) When a Get/Set/Get(Walk)/GetTable issued from a MIB browser from a >> PC, I get to a C application to return actual data. >> >> Thanks, >> Simon >> >> >> >> ------------------------------ >> >> ------------------------------------------------------------------------------ >> Get your Android app more play: Bring it to the BlackBerry PlayBook >> in minutes. BlackBerry App World™ now supports Android™ Apps >> for the BlackBerry® PlayBook™. Discover just how easy and simple >> it is! http://p.sf.net/sfu/android-dev2dev >> >> ------------------------------ >> >> _______________________________________________ >> Net-snmp-users mailing [email protected] >> Please see the following page to unsubscribe or change other options:https://lists.sourceforge.net/lists/listinfo/net-snmp-users >> >> >> > ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ 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