Facing problem when we call init_agent() before calling init_snmp()

"Sekhar Reddy Ravi-G20226" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
we are using net-snmp 5.2.2 .
snmpd in agentx mode ("-x 705" as startup parameter),  and subagent are
running as separate processes.
 
In the subagent initialization, we are calling
init_agent(/usr/share/snmp/subagt.conf), before calling
init_snmp("/usr/share/snmp/subagt.conf") as per the suggested net-snmp
documentation.  Because of this, subagent is trying to attempt open
connection with the agent on "/var/agentx/master" socket from
init_agent() routine.  This attempt to open session is failed and an
alarm is registered for an interval of 15 seconds to re-attempt the open
with snmpd.   
 
But as per our subagent configuration it should attempt to open the
connection with the agent on " tcp:localhost:705" socket, and with an
agentxPingInterval of 1 second.   
 
I dig into the code of init_snmp(). init_snmp() api is calling
read_configs() to read the subagent configuration (agentxsocket,
agentxPingInterval etc).  To my understanding this will overwrite the
default values with which init_agent() will attempt to open the session.
As per that understanding, I have called init_snmp() before calling
init_agent().   I observed that the subagent established connection with
agent on "tcp:localhost:705" socket after agentxPingInterval of 1sec. 
 
This is working fine for us but we want to know is there is any problem
in calling init_snmp() before init_agent().
 
Any help on this will be appreciated. 
 
Thanks,
Ravi
   

 

 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
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.