Re: working with tables...

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 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008
Alejandro Islas
 
Posts: n/a
Default Re: working with tables...

--===============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 &lt;<a href="mailto:D.T.Shield@liverpool.ac.uk">D.T.Shiel d@liverpool.ac.uk</a>&gt; 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 &lt;<a href="mailto:alex.islas@gmail.com">alex.islas@gmai l.com</a>&gt; wrote:<br>
&gt; But when I try to read a table..the snmpd deamon crashes.<br>
</div><div class="Ih2E3d">&gt; Could anyone give me an idea of where to<br>
&gt; 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>
&gt; Here is part of my mib file (one of the tables)...<br>
<br>
</div>A few comments:<br>
<div class="Ih2E3d"><br>
<br>
&gt; MonThreadsTable OBJECT-TYPE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SYNTAX &nbsp; &nbsp; &nbsp; &nbsp; SEQUENCE OF monThreadsEntry<br>
<br>
</div>The name of the table must start with a lower case letter<br>
&nbsp; (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. &nbsp; &nbsp; &nbsp;(MonThreadsEntry)<br>
<div class="Ih2E3d"><br>
<br>
<br>
&gt; monThreadsEntry OBJECT-TYPE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; SYNTAX &nbsp; &nbsp; &nbsp;monThreadsDetailsEntry<br>
<br>
</div>The syntax of this object must match that of the<br>
monThreadsTable entry. &nbsp; &nbsp;Conventionally, this<br>
would be the same as the name of this MIB<br>
object, but capitalised (MonThreadsEntry)<br>
<br>
<br>
<br>
&gt; monThreadsDetailsEntry ::=<br>
&gt; &nbsp; &nbsp; &nbsp;SEQUENCE {<br>
<br>
MonThreadsEntry<br>
<div class="Ih2E3d"><br>
<br>
<br>
&gt; IdThread &nbsp; &nbsp; OBJECT-TYPE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SYNTAX INTEGER<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ACCESS &nbsp;read-only<br>
<br>
</div>The index object should be &quot;not-accessible&quot;.<br>
<br>
<br>
&gt; ProcTime &nbsp; &nbsp; OBJECT-TYPE<br>
&gt; MaxProcTime &nbsp; &nbsp; OBJECT-TYPE<br>
&gt; ExecNumber &nbsp; &nbsp;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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:48 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0