On Fri, Jul 17, 2009 at 1:42 PM, Logeswari Viswanath<[email protected]> wrote:
> On Thu, Jul 16, 2009 at 5:17 PM, Dave Shield<[email protected]> 
> wrote:
>> 2009/7/15 Logeswari Viswanath <[email protected]>:
>>>          - These session attributes are hardcoded with values 1 sec for
>>> timeout and 5 for retries
>>>
>>>       Can these values be made configurable using the variables
>>> agentXTimeout and agentXRetries in the file snmp.conf?
>>
>> These values *are* configurable using these directives.
>> But they should go in the subagent configuration file,
>> *not* the library config file ('snmp.conf').
>>
>> What token do you pass to 'snmp_init' in your subagent?
>> That's the name of the config file to use.
>
> I have checked these configurable items but they did not help me.
>
> SNMP agent is initialized using the following function calls
>
>          - init_agent() function where session is opened to the master agent.
>            Session attributes timeout and retries are set in
>            subagent_open_master_session() function
> (agent/mibgroup/agentx/subagent.c)
>           (I have pasted the relevant lines of the function)
>
> -----------------------------------------------------------------------------
>            sess.retries = SNMP_DEFAULT_RETRIES;
>            sess.timeout = SNMP_DEFAULT_TIMEOUT;
> -------------------------------------------------------------------------------
>
>             These values are re-initialized in the function
> _sess_copy() (snmplib/snmp_api.c)
>            (I have pasted the relevant lines of the function)
> -----------------------------------------------------------------------------
>    if (session->retries == SNMP_DEFAULT_RETRIES)
>        session->retries = DEFAULT_RETRIES;
>    if (session->timeout == SNMP_DEFAULT_TIMEOUT)
>        session->timeout = DEFAULT_TIMEOUT;
> -----------------------------------------------------------------------------
>            (Ctrl flow - snmp_open_ex -> snmp_sess_open -> _sess_open
> -> snmp_sess_copy -> _sess_copy)
>
>          - init_snmp() function where snmp configuration files are
> loaded and default_store is used to store the values loaded.
>
>
> Looking into the code, it looks like the configuration files are
> loaded after setting the session attributes. Please correct me if i am
> wrong.
>
> Best Regards,
> Logeswari.
>

Please let me know your comments on my understanding.

Best Regards,
Logeswari.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to