On 02/09/06, Arnaud BODENAN <[EMAIL PROTECTED]> wrote:
> I have tested the function register_int_index to generate an unique index
> and added it in the registration of my table genServerTable.
>               .... I log the index returned by
> the function register_int_index (I have to increment it after the call of
> register_int_index, as the first index returned by register_int_index begins
> with 0 instead of 1)

Errr... that doesn't sound safe.
If you've asked 'register_int_index'  to give you an arbitrary index,
then you should be using the value that it gives you, since that's
what it has allocated.  You might get away with this as long as it's
only your code that uses the result, and this *all* processes things
in the same way.
   But it feels much safer for the first application to register *two*
indexes (0 and 1), and only actually use the second one.   Or in
general, for each application to check the returned value, and request
a second index if the first one was 0.



> All seems to be OK (in the log and in the attribution of the index):
> Application 1 registers the row 1
> Application 2 registers the row 2
> Application 3 registers the row 3
> Application 4 registers the row 4

This is extra code, registering the row using the index just supplied - yes?
What does this code look like?   Does the registration succeed?


> But when I execute a snmpwalk or a snmpget, I only get metrics for the index
> 1. The rows 2, 3, and 4 have not been registered.

What does walking the nsRegistryTable look like?


> I appreciate any help about this problem. and I would like to know if my
> approach (share the same table by several applications) is possible or not.

Yes - this approach is certainly possible.
The AgentX protocol was deliberately designed to support this mode of
working, and the Net-SNMP code has been written to implement this
behaviour.

However, it's only fair to say that this style of working probably
hasn't been used very widely, so won't have been tested to the same
extent as registering full OID subtrees.  It's quite possible that
there are bugs in the code.   You may need to proceed carefully, and
check exactly what has/hasn't worked at each stage.


dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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

Reply via email to