Re: Newbie needs help

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoMtGbzLJ22nx64zS=JKJ-wiz0uQhfSHyMpO8Y7yN3pAfwotA@mail.gmail.com>
On 26 May 2012 11:00, Magda Stefan <[email protected]> wrote:
>     One of the tasks that I had to do was to create 2 new oids that
> represent "One way delay" and "Available transfer rate" for each of the
> computer's network interface. I chose to introduce them under the ifTable.

Hmmm....   I'm not sure that's a particularly good idea.
It's probably easier to start with a completely standalone
table, rather than trying to integrate additional columns
into an existing implementation.
   And the ifTable code is probably one of the more complex
areas of the existing agent, so is going to be that much harder
to understand, let alone extend.

(And that's ignoring the fact that the ifTable is an IETF-defined standard,
so you shouldn't be unilaterally changing or extending it anyway!)


> Now, I have to configure the agent to get the right data from a file(eg.
> eth0atr, eth0owd) and bind it to those variables. I began with the
> mib2c.mfd.conf function to create the proper "C" files but I don't know how
> to modify them because on Internet I found only a tutorial for the 5.2
> version of net-snmp.

There won't have been any significant changes in the MIB module API
since 5.2, so that shouldn't actually be a problem.   Any 5.x-based
documentation should be broadly useable.

  I'm not a great fan of the MfD framework personally.
I'd be more inclined to start with mib2c.table-data.conf
(and turn on the internal cache, which neatly separates the
loading of data from the SNMP processing).

  But I'm sure Robert will leap to the defence of the MfD
approach - it does mean that you can ignore large chunks
of the code, and concentrate on a number of small, tightly
focussed routines

  There are several example of both approaches within
the Net-SNMP agent source code.


> PS: ....  please help me as soon as
> possible because I my deadline is in 3 days.

Three days?!   To extend/implement a MIB table?
With no prior experience of coding the agent?
    I have to say that this feels an unrealistic timetable.
(Particularly since we're now in the weekend, so you're
effectively losing a couple of days anyway!)

I'd suggest you have a word with your tutor about exactly
what you're being asked to do - I suspect that either
you've misunderstood the exercise, or your tutor has
misjudged the scale of the task you have been set.
  (Unless you've been sitting on this exercise for some
time, of course, and have been stimulated into action by
the imminent deadline!)

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.