--===============1705136143==
Content-Type: multipart/alternative; boundary="0-1568358168-1210249097=:63779"
Content-Transfer-Encoding: 8bit

--0-1568358168-1210249097=:63779
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


We had implemented the third option which you said with cache time of 6 sec.

And that too have some problem.

1. Say the cache time is 6 sec & XX Table contains 8 instance.
snmwalk request comes at 3 rd sec and has displayed say 4 instance details.
At this time cacheing would have crossed 6 sec, an instance would ahve add/remov-ed & started to refresh the data.
Obviously this leads to displaying the ambiguous data while displaying the remaining instance.

This arise me a necessity to diff. walk & getnext.

We also tried to identifying walk using timestamp b/w simultaneous snmpgetnext request.That too works good only if a single snmwalk is given at a time. If multiple request are given this solution also breaks the consistency of data.



You have clearly explained what i thought , through the diagram in the follow up reply mail. Thanks. Thanks..

Dave Shield wrote: 2008/5/8 valantina arumugam :
> Is there a way to differentiate the request from snmpwalk &
> snmpgetnext ?


No.

As Suresh has said, there is no such thing as an "snmpwalk"
request. The agent will simply receive a GETNEXT request.
The structure of this is standard and will look identical - whether
it is a one-off request, or part of a sequence (e.g. from snmpwalk
or snmptable). There are no "request context" flags.
The agent treats each incoming request identically.


> For snmpgetnext request i have to do some operation for xx OID.
> For snmpwalk request , i have to do the same operation
> plus some other functionality for xx OID.


That's simply not possible.
SNMP doesn't work that way.


> Eg :
> snmpwalk of xx table :
> we gather all the instance of xx table data for the 1st getnext req. itself.
> while walk is going on , there is a chance an instance may get
> deleted/added thro' other appln( other than snmp) .which will result
> in displaying of ambiguous data.


That, on the other hand, *is* possible to handle sensibly.

Three options spring to mind.

One would be to have a "last change time" object, which would
be updated whenever a row was added or deleted. The client could
then retrieve the value of this object along with the contents of the
table.
If this value changes during the walking of the table, the app
would know that the results were inconsistent, and could discard
them and start again. This is probably most useful in conjunction
with the GETBULK request, rather than GETNEXT (though it would
work with both).

The second option is to request the data for each row in a single
GETNEXT request, rather than walking through each column in turn.
Even rows were added or deleted during the course of the walk,
the results for each row would at least be consistent.
This is the approach used by the "snmptable" command

Both of these approaches require action at the client side.
The third approach is to handle this purely at the agent side,
by loading all of the data for the table in one go, and caching
it. Incoming SNMP requests would be served from this cache,
regardless of what changes might happen to the underlying data.
The results returned might be a bit out of date, but would at least
be consistent.
That's similar to what you were asking about, but the cache
is marked as invalid based on age, rather than the characteristics
of incoming requests.


The Net-SNMP agent includes just such a cache helper.
Invoke "mib2c -S cache=1 ...." (with most of the table templates)
to generate a suitable framework.

Dave



---------------------------------
Share files, take polls, and make new friends - all under one roof. Click here.
--0-1568358168-1210249097=:63779
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


We had implemented the third option which you said with cache time of 6 sec.

And that too have some problem.

    1.  Say the cache time is 6 sec & XX Table contains 8 instance.
         snmwalk request comes at 3 rd sec and has displayed  say 4 instance details.
         At this time cacheing would have crossed 6 sec, an instance would ahve add/remov-ed & started to refresh the data.
         Obviously this leads to displaying the ambiguous data while displaying the remaining instance.
        
This arise me a necessity to diff. walk & getnext.

We also tried to identifying walk using timestamp b/w simultaneous snmpgetnext request.That too works good only if a single snmwalk is given at a time. If multiple request are given this
solution also breaks the consistency of data.



You have clearly explained what i thought , through the diagram in the follow up reply mail. Thanks. Thanks..

Dave Shield <D.T.Shield@liverpool.ac.uk> wrote:
2008/5/8 valantina arumugam :
> Is there a way to differentiate the request from snmpwalk &
> snmpgetnext ?

No.

As Suresh has said, there is no such thing as an "snmpwalk"
request. The agent will simply receive a GETNEXT request.
The structure of this is standard and will look identical - whether
it is a one-off request, or part of a sequence (e.g. from snmpwalk
or snmptable). There are no "request context" flags.
The agent treats each incoming request identically.


> For snmpgetnext request i have to do some operation for xx
OID.
> For snmpwalk request , i have to do the same operation
> plus some other functionality for xx OID.

That's simply not possible.
SNMP doesn't work that way.


> Eg :
> snmpwalk of xx table :
> we gather all the instance of xx table data for the 1st getnext req. itself.
> while walk is going on , there is a chance an instance may get
> deleted/added thro' other appln( other than snmp) .which will result
> in displaying of ambiguous data.

That, on the other hand, *is* possible to handle sensibly.

Three options spring to mind.

One would be to have a "last change time" object, which would
be updated whenever a row was added or deleted. The client could
then retrieve the value of this object along with the contents of the
table.
If this value changes during the walking of the table, the app
would know that the results
were inconsistent, and could discard
them and start again. This is probably most useful in conjunction
with the GETBULK request, rather than GETNEXT (though it would
work with both).

The second option is to request the data for each row in a single
GETNEXT request, rather than walking through each column in turn.
Even rows were added or deleted during the course of the walk,
the results for each row would at least be consistent.
This is the approach used by the "snmptable" command

Both of these approaches require action at the client side.
The third approach is to handle this purely at the agent side,
by loading all of the data for the table in one go, and caching
it. Incoming SNMP requests would be served from this cache,
regardless of what changes might happen to the underlying data.
The results returned might be a bit out of date, but would at least
be consistent.
That's similar to what you were asking
about, but the cache
is marked as invalid based on age, rather than the characteristics
of incoming requests.


The Net-SNMP agent includes just such a cache helper.
Invoke "mib2c -S cache=1 ...." (with most of the table templates)
to generate a suitable framework.

Dave





Share files, take polls, and make new friends - all under one roof. Click here.
--0-1568358168-1210249097=:63779--


--===============1705136143==
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
--===============1705136143==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--===============1705136143==--