This is a discussion on Re: working with tables... within the SNMP Coders forums, part of the Networking and Network Related category; --===============1312620723== Content-Type: multipart/alternative; boundary="----=_Part_15552_30732870.1208363773150" ------=_Part_15552_30732870.1208363773150 Content-Type: text/plain; charset=ISO-8859-1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1312620723==
Content-Type: multipart/alternative; boundary="----=_Part_15552_30732870.1208363773150" ------=_Part_15552_30732870.1208363773150 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for the info Dave, I did the GET requests with the same results. I'm kind of new to linux programming so could you please recommend me a debugger, could Eclipse help me??? Another question, I used the mib2c.iterate.conf mib2c file to generate the code. Is this the best configuration file to used as a first approach to coding mibs tables? Should I used mfd file??? My main goal is to keep my code as simple as possible On Wed, Apr 16, 2008 at 3:29 AM, Dave Shield <D.T.Shield@liverpool.ac.uk> wrote: > On 16/04/2008, Alejandro Islas <alex.islas@gmail.com> wrote: > > But when I try to read a table..the snmpd deamon crashes. > > Could anyone give me an idea of where to > > start to lookaround??? > > One thing would be to identify exactly what triggers the crash. > Does it fail on a GETNEXT of the first entry? > On a GETNEXT of any of the four columns? > On a GETNEXT of an internal row instance? > > What about GET requests for particular values? > What about GET requests for missing values? > > > Try running the agent under a debugger, and see where > the crash occurs in the code. > > > > > Here is part of my mib file (one of the tables)... > > A few comments: > > > > MonThreadsTable OBJECT-TYPE > > SYNTAX SEQUENCE OF monThreadsEntry > > The name of the table must start with a lower case letter > (monThreadsTable) > > The name of the type must start with an upper case letter > And it's the name of the SEQUENCE type, not the Entry > object. (MonThreadsEntry) > > > > > monThreadsEntry OBJECT-TYPE > > SYNTAX monThreadsDetailsEntry > > The syntax of this object must match that of the > monThreadsTable entry. Conventionally, this > would be the same as the name of this MIB > object, but capitalised (MonThreadsEntry) > > > > > monThreadsDetailsEntry ::= > > SEQUENCE { > > MonThreadsEntry > > > > > IdThread OBJECT-TYPE > > SYNTAX INTEGER > > ACCESS read-only > > The index object should be "not-accessible". > > > > ProcTime OBJECT-TYPE > > MaxProcTime OBJECT-TYPE > > ExecNumber OBJECT-TYPE > > These objects must start with a lower-case letter. > Conventionally, you would normally use a common prefix, > to make clear that they're all part of the same table. > > monThreadsProcTime > monThreadsMaxProcTime > monThreadsExecNumber > > > Dave > ------=_Part_15552_30732870.1208363773150 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for the info Dave, I did the GET requests with the same results. I'm kind of new to linux programming so could you please recommend me a debugger, could Eclipse help me??? Another question, I used the mib2c.iterate.conf mib2c file to generate the code. Is this the best configuration file to used as a first approach to coding mibs tables? Should I used mfd file??? My main goal is to keep my code as simple as possible<br> <br><div class="gmail_quote">On Wed, Apr 16, 2008 at 3:29 AM, Dave Shield <<a href="mailto:D.T.Shield@liverpool.ac.uk">D.T.Shiel d@liverpool.ac.uk</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">On 16/04/2008, Alejandro Islas <<a href="mailto:alex.islas@gmail.com">alex.islas@gmai l.com</a>> wrote:<br> > But when I try to read a table..the snmpd deamon crashes.<br> </div><div class="Ih2E3d">> Could anyone give me an idea of where to<br> > start to lookaround???<br> <br> </div>One thing would be to identify exactly what triggers the crash.<br> Does it fail on a GETNEXT of the first entry?<br> On a GETNEXT of any of the four columns?<br> On a GETNEXT of an internal row instance?<br> <br> What about GET requests for particular values?<br> What about GET requests for missing values?<br> <br> <br> Try running the agent under a debugger, and see where<br> the crash occurs in the code.<br> <div class="Ih2E3d"><br> <br> <br> > Here is part of my mib file (one of the tables)...<br> <br> </div>A few comments:<br> <div class="Ih2E3d"><br> <br> > MonThreadsTable OBJECT-TYPE<br> > SYNTAX SEQUENCE OF monThreadsEntry<br> <br> </div>The name of the table must start with a lower case letter<br> (monThreadsTable)<br> <br> The name of the type must start with an upper case letter<br> And it's the name of the SEQUENCE type, not the Entry<br> object. (MonThreadsEntry)<br> <div class="Ih2E3d"><br> <br> <br> > monThreadsEntry OBJECT-TYPE<br> > SYNTAX monThreadsDetailsEntry<br> <br> </div>The syntax of this object must match that of the<br> monThreadsTable entry. Conventionally, this<br> would be the same as the name of this MIB<br> object, but capitalised (MonThreadsEntry)<br> <br> <br> <br> > monThreadsDetailsEntry ::=<br> > SEQUENCE {<br> <br> MonThreadsEntry<br> <div class="Ih2E3d"><br> <br> <br> > IdThread OBJECT-TYPE<br> > SYNTAX INTEGER<br> > ACCESS read-only<br> <br> </div>The index object should be "not-accessible".<br> <br> <br> > ProcTime OBJECT-TYPE<br> > MaxProcTime OBJECT-TYPE<br> > ExecNumber OBJECT-TYPE<br> <br> These objects must start with a lower-case letter.<br> Conventionally, you would normally use a common prefix,<br> to make clear that they're all part of the same table.<br> <br> monThreadsProcTime<br> monThreadsMaxProcTime<br> monThreadsExecNumber<br> <font color="#888888"><br> <br> Dave<br> </font></blockquote></div><br> ------=_Part_15552_30732870.1208363773150-- --===============1312620723== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757...un.com/javaone --===============1312620723== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============1312620723==-- |