nv-l
[Top] [All Lists]

Re: [nv-l] question on snmpCollect

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] question on snmpCollect
From: James Shanks <jshanks@us.ibm.com>
Date: Wed, 28 Dec 2005 09:14:22 -0500
Delivery-date: Wed, 28 Dec 2005 14:14:52 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <OFAC89870B.D6176A0F-ON482570E5.0009509C-482570E5.000EDF25@cn.ibm.com>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Gang, you are still thinking in terms of interfaces, and not instances.
With a specific interface in the LIST, then a get is done for that
instance, period.   There's no need for a  next.  You would use an SNMP
getnext to get the next value in a table.   But that's not what you told
snmpCollect to obtain.  Your config said to ask the agent for just that one
piece of data.

I have no performance benchmarks to share with you.  So far as I know, none
have ever been published.  But I would guess that, yes, if you wanted only
two instances in a potentially huge table, then it would be more efficient
to obtain just the data you really want using a LIST.  However, it will
take snmpCollect longer to set up a LIST, because each separate entry will
have to be processed independently.  He will have no knowledge that the
next item in the LIST is just another instance of the same host until the
processing is done.  So large lists have performance issues at start-up.

There is nothing to stop you, or the customer,  from performing a test in
your own environment to see whether using a LIST or ALL  is more efficient
for obtaining the same data, but in my experience the real difference is
how the quickly the agent responds, and whether there are any network
delays.  What really costs a lot is a time-out and a retry.   I have seen
some agents which usually fail to respond to the first request, but are
quick once you get their attention, and in that case, the ALL might work
better.  As they say about cars, your mileage may vary.

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group


                                                                           
             Gang Cheng                                                    
             <gcheng@cn.ibm.co                                             
             m>                                                         To 
             Sent by:                  nv-l@lists.us.ibm.com               
             owner-nv-l@lists.                                          cc 
             us.ibm.com                                                    
                                                                   Subject 
                                       Re: [nv-l] question on snmpCollect  
             12/27/2005 09:43                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
                   nv-l                                                    
                                                                           
                                                                           





Thanks, James,

        Based on what you explained, can I assume the behavior
(snmpget+snmpnext) also applies to the
        snmpCollect configuration with LIST of instances? If this is the
case, the difference between
        ALL and LIST option will only be at the time when the daemon stores
the data on the disk. Is
        it correct?

        If a router has 200+ interfaces and I only want to collect data
from two of its interfaces.
        The two are unfortunately at the top and bottom of the index list,
will it be more efficient
        to just use snmpget rather than snmpget+snmpnext to loop through
all instances?

        Thanks.

Best Regards

Geoffrey (Gang) Cheng
Team Leader, Tivoli Lab Based Services
IBM Certified Professional - ITS/ITA
Tivoli Certified Instructor/ITIL Manager Certified
IBM China Software Development Lab
Tel:   (86-10) 65391188 Ext 4159
Mobile:(86-0) 13911867597
Fax:   (86-10) 65391688
E-mail: gcheng@cn.ibm.com

                                                                          
    James Shanks                                                          
    <jshanks@us.ibm.com>                     To:                          
    Sent by:                         nv-l@lists.us.ibm.com                
    owner-nv-l@lists.us.ibm.com              cc:                          
                                             Subject:        Re: [nv-l]   
                                     question on snmpCollect              
    2005-12-27 22:43                                                      
    Please respond to nv-l                                                
                                                                          





You are laboring under something of a misconception.  Your assumption of
how the process works (" it will check, somewhere, what are the instances
of the device and issue the snmpget against every instance")  is incorrect.
The actual process involves doing an snmpget for the first value in the
table, and an snmpnext for every subsequent value, until the agent responds
with data that is not part of what you asked for, which indicates that
there is no more data in the table originally specified.  The process is
most similar to the snmpwalk command.  You tell it where to start and it
keeps walking until the end.  The only difference is that snmpCollect stops
when the data returned is no longer relevant to what was specified in his
configuration.

When you ask snmpCollect to collect all instances, he does not know in
advance whether there is data available or not, nor how many interfaces the
device has, nor even whether it will respond at all.  He does not first
query agent  on the device and ask how many interfaces are active.  He asks
the agent for just two things, it's sysUpTime, and  the first instance MIB
variable you specified, and he does SNMP getnext requests until the data
returned indicates that there is no more data to be had concerning that
table.

As for whether there will be data for down interfaces, try using the MIB
Browser against the same device you want to collect from, for the same MIB
variable,  and you should easily see how this works.  If you are querying a
table and don't specify what instance of the table you want, then you will
see all that the agent cares to show you.   SNMP recognizes two kinds of
tables, sparse and "full" for want of a better term.  If it is a sparse
table, then you will get data only for those instances which have data;
while a "full" regular  table would probably contain zeros as placeholders
for nonexistent values.

Finally, the number of down interfaces does not impact snmpCollect.  What
impacts him is the size of the table you've asked him to get, how
frequently he has to get it,  and how quickly the remote agent responds
when queried.  Some agents put a low priority on SNMP requests if they are
busy with other things.  The thing to remember that snmpCollect is not
talking to individual interfaces.  He's talking to the SNMP agent on the
box, which keeps track of them.  Whether they are all up or all down, all
that matters to snmpCollect is that the agent responds.

HTH,

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and Windows
Tivoli Software / IBM Software Group



            Gang Cheng
            <gcheng@cn.ibm.co
            m>                                                         To
            Sent by:                  nv-l@lists.us.ibm.com
            owner-nv-l@lists.                                          cc
            us.ibm.com
                                                                  Subject
                                      [nv-l] question on snmpCollect
            12/27/2005 09:09
            AM


            Please respond to
                  nv-l







Hi, list,

       Got a question on snmpCollect's behavior. When I configure through
xnmsnmpconf to collect data from
       all instances of a network device, what does snmpCollect do? I
assume it will check, somewhere, what
       are the instances of the device and issue the snmpget against every
instance.

       If the instance (interface) is already down, will snmpCollect
detect the down status and stop query
       that interface? Or it will do the snmpget regardless and return
with an error or defer the query to
       some later time.

       If the above assumption is true and if there are a lot of down
interfaces on a router, will it impact
       the performance of snmpCollect?

       Thanks.


Best Regards

Geoffrey (Gang) Cheng
Team Leader, Tivoli Lab Based Services
IBM Certified Professional - ITS/ITA
Tivoli Certified Instructor/ITIL Manager Certified
IBM China Software Development Lab
Tel:   (86-10) 65391188 Ext 4159
Mobile:(86-0) 13911867597
Fax:   (86-10) 65391688
E-mail: gcheng@cn.ibm.com




<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web