[prev in list] [next in list] [prev in thread] [next in thread]
List: net-snmp-users
Subject: Re: AgentX reconnect time
From: Anders Wallin <wallinux () gmail ! com>
Date: 2019-02-22 16:18:43
Message-ID: CAF2baFfwwcaX9RXfR0pWkVciPQhKu36xboOB__pBSdiNbKXQCw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
https://sourceforge.net/p/net-snmp/bugs/2926/
Anders Wallin
On Fri, Feb 22, 2019 at 2:08 PM Mostafa Kassem <mostafak@danlawinc.com>
wrote:
> Thank you, sir. You are a gentleman and a scholar.
>
>
>
> I am using 5.8
>
>
>
> All the best,
>
>
>
> Mostafa
>
>
>
> *From:* Anders Wallin <wallinux@gmail.com>
> *Sent:* Friday, February 22, 2019 2:56 AM
> *To:* Mostafa Kassem <mostafak@danlawinc.com>
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Subject:* Re: AgentX reconnect time
>
>
>
> It's not working in 5.7.3 either and w/o the possibility to us "-c" option
> for the agent.
>
> So it's broken!!
>
>
>
> Regards
>
> Anders Wallin
>
>
>
>
>
> On Fri, Feb 22, 2019 at 7:44 AM Anders Wallin <wallinux@gmail.com> wrote:
>
> Hi Mostafa,
>
>
>
> which version of net-snmp are you using?
> In 5.8 you can use the "-c" option which works, but I also found a bug in
> it using the default paths
>
> *# ./mysubagent -h *
>
> USAGE: ./mysubagent [OPTIONS]
>
>
>
> OPTIONS:
>
> -c FILE[,...] read FILE(s) as configuration file(s)
>
> -C do not read the default configuration files
>
> ....
> *# cat agentx.conf *
>
> [snmp] logTimestamp 1
>
> agentXPingInterval 5
>
> *# ./mysubagent -C -c agentx.conf -f -x /var/agentx/master *
>
> 2019-02-22 07:23:40 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
> 2019-02-22 07:23:45 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
> 2019-02-22 07:23:50 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
>
> The name of the agentx config file can be agentx.conf or agentx.local.conf
> and it should be in one of this directories
>
> $HOME/.snmp
>
> /usr/etc/snmp
>
> /usr/lib/snmp
>
> /usr/share/snmp
>
> /var/lib/net-snmp
>
> or you can use the SNMPCONFPATH
>
>
>
> AND HERE comes the bug!! Using SNMPCONFPATH or the default path, you will
> get "Warning: Unknown token: agentXPingInterval." and the timeout will be
> set to the default value of 15.
>
> I will file a bug on this!
>
> *# SNMPCONFPATH=$PWD ./mysubagent -f -x /var/agentx/master*
>
> 2019-02-22 07:37:22 /root/snmp-test/agentx.conf: line 2: Warning: Unknown
> token: agentXPingInterval.
>
> 2019-02-22 07:37:22 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
> 2019-02-22 07:37:37 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
>
>
> *# cp agentx.conf $HOME/.snmp/*
>
> *# ./mysubagent -f -x /var/agentx/master*
>
> 2019-02-22 07:41:39 /root/.snmp/agentx.conf: line 2: Warning: Unknown
> token: agentXPingInterval.
>
> 2019-02-22 07:41:39 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
> 2019-02-22 07:41:54 Warning: Failed to connect to the agentx master agent
> (/var/agentx/master):
>
>
>
> I will check 5.7.3 and be back with more information
>
> Regards
>
> Anders Wallin
>
>
>
>
>
> On Thu, Feb 21, 2019 at 10:43 PM Mostafa Kassem <mostafak@danlawinc.com>
> wrote:
>
> Thank you for your reply, Anders.
>
>
>
> I created an agentx.conf file with this single line:
>
>
>
> agentxPingInterval 5
>
>
>
>
>
> I tried putting agentx.conf into one the following directories to no avail:
>
> /var/agentx/
>
> /var/snmp/
>
> Var/net-snmp/
>
>
>
> Where should the agentx.conf file go? I did a search on this topic and
> couldn't find an answer.
>
>
>
> It is still 15 seconds of disconnection.
>
>
>
> Thanks again,
>
>
>
> Mostafa
>
>
>
> *From:* Anders Wallin <wallinux@gmail.com>
> *Sent:* Thursday, February 21, 2019 2:57 AM
> *To:* Mostafa Kassem <mostafak@danlawinc.com>
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Subject:* Re: AgentX reconnect time
>
>
>
> Hi Mostafa,
>
>
>
> you need to set it in the config file for your agentx(e.g agentx.conf),
> not in snmpd.conf
>
> Regards
>
> Anders Wallin
>
>
>
>
>
> On Thu, Feb 21, 2019 at 1:22 AM Mostafa Kassem <mostafak@danlawinc.com>
> wrote:
>
> When we restart the snmpd, the agent detects that the snmpd is no longer
> running and disconnects, waits 15 seconds and then connects to the snmpd
> again.
>
> AgentX master disconnected us, reconnecting in 15
>
>
>
> I would like to reduce this time to 5 seconds.
>
>
>
> Is this time specifieded in agentXPingInterval as described here?
> http://www.net-snmp.org/docs/man/snmpd.conf.html
>
>
>
> However if I add agentXPingInterval 5 to the snmpd.conf file, I get this
> error:
>
> /var/snmp/snmpd.conf: line 35: Warning: Unknown token:agentXPingInterval.
>
>
>
> I found this code in agentx_config.c which leads me to believe that this
> value is hardcoded and not set in any configuration file. So changing it
> requires editing and recompile of the code.
>
>
>
> #ifdef USING_AGENTX_SUBAGENT_MODULE
>
> /*
>
> * tokens for master agent
>
> */
>
> if (SUB_AGENT == agent_role) {
>
> /*
>
> * set up callbacks to initiate master agent pings for this
> session
>
> */
>
> netsnmp_ds_register_config(ASN_INTEGER,
>
>
> netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,
>
> NETSNMP_DS_LIB_APPTYPE),
>
> "agentxPingInterval",
>
> NETSNMP_DS_APPLICATION_ID,
>
> NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL);
>
> /* ping and/or reconnect by default every 15 seconds */
>
> netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID,
>
> NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 15);
>
>
>
> }
>
> #endif /* USING_AGENTX_SUBAGENT_MODULE */
>
>
>
> Thanks,
>
>
>
> Mostafa
>
> _______________________________________________
> 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
>
>
[Attachment #5 (text/html)]
<div dir="ltr"><div dir="ltr"><a \
href="https://sourceforge.net/p/net-snmp/bugs/2926/">https://sourceforge.net/p/net-snmp/bugs/2926/</a><br \
clear="all"><div><div dir="ltr" class="gmail_signature">Anders \
Wallin</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, Feb 22, 2019 at 2:08 PM Mostafa Kassem <<a \
href="mailto:mostafak@danlawinc.com">mostafak@danlawinc.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_2162699646945799561WordSection1">
<p class="MsoNormal"><span style="font-size:10pt">Thank you, sir. You are a gentleman \
and a scholar.<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:10pt"><u></u> <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:10pt">I am using 5.8<u></u><u></u></span></p> <p \
class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p> <p \
class="MsoNormal"><span style="font-size:10pt">All the best,<u></u><u></u></span></p> \
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p> <p \
class="MsoNormal"><span style="font-size:10pt">Mostafa<u></u><u></u></span></p> <p \
class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p> <p \
class="MsoNormal"><b>From:</b> Anders Wallin <<a href="mailto:wallinux@gmail.com" \
target="_blank">wallinux@gmail.com</a>> <br> <b>Sent:</b> Friday, February 22, \
2019 2:56 AM<br> <b>To:</b> Mostafa Kassem <<a \
href="mailto:mostafak@danlawinc.com" \
target="_blank">mostafak@danlawinc.com</a>><br> <b>Cc:</b> <a \
href="mailto:net-snmp-users@lists.sourceforge.net" \
target="_blank">net-snmp-users@lists.sourceforge.net</a><br> <b>Subject:</b> Re: \
AgentX reconnect time<u></u><u></u></p> <p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">It's not working in 5.7.3 either and w/o the possibility to \
us "-c" option for the agent. <u></u><u></u></p> <div>
<p class="MsoNormal">So it's broken!!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Regards <br clear="all">
<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Anders Wallin<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Fri, Feb 22, 2019 at 7:44 AM Anders Wallin <<a \
href="mailto:wallinux@gmail.com" target="_blank">wallinux@gmail.com</a>> \
wrote:<u></u><u></u></p> </div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt \
solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"> \
<div> <div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi Mostafa,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">which version of net-snmp are you \
using?<br> In 5.8 you can use the "-c" option which works, but I also found \
a bug in it using the default paths<u></u><u></u></p> <div>
<p class="MsoNormal"><b><span style="font-family:"Courier New""># \
./mysubagent -h </span></b><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">USAGE: \
./mysubagent [OPTIONS]</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier \
New"">OPTIONS:</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New""> -c \
FILE[,...] read FILE(s) as configuration \
file(s)</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New""> -C \
do not read the default configuration files</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">....<br>
<b># cat agentx.conf </b></span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">[snmp] \
logTimestamp 1</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier \
New"">agentXPingInterval 5</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><b><span style="font-family:"Courier New""># \
./mysubagent -C -c agentx.conf -f -x /var/agentx/master \
</span></b><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:23:40 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:23:45 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:23:50 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><br>
The name of the agentx config file can be agentx.conf or agentx.local.conf and it \
should be in one of this directories<u></u><u></u></p> </div>
<div>
<div>
<p class="MsoNormal">$HOME/.snmp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">/usr/etc/snmp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">/usr/lib/snmp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">/usr/share/snmp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">/var/lib/net-snmp<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal">or you can use the SNMPCONFPATH<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">AND HERE comes the bug!! Using SNMPCONFPATH or the default path, \
you will get "Warning: Unknown token: agentXPingInterval." and the timeout \
will be set to the default value of 15.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal">I will file a bug on this!<u></u><u></u></p>
<div>
<p class="MsoNormal"><b><span style="font-family:"Courier New""># \
SNMPCONFPATH=$PWD ./mysubagent -f -x /var/agentx/master</span></b><u></u><u></u></p> \
</div> <div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:37:22 /root/snmp-test/agentx.conf: line 2: Warning: Unknown token: \
agentXPingInterval.</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:37:22 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:37:37 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-family:"Courier New""># cp \
agentx.conf $HOME/.snmp/</span></b><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><b><span style="font-family:"Courier New""># \
./mysubagent -f -x /var/agentx/master</span></b><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:41:39 /root/.snmp/agentx.conf: line 2: Warning: Unknown token: \
agentXPingInterval.</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:41:39 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">2019-02-22 \
07:41:54 Warning: Failed to connect to the agentx master agent (/var/agentx/master): \
</span><u></u><u></u></p> </div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">I will check 5.7.3 and be back with \
more information<u></u><u></u></p> </div>
<div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Anders Wallin<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 21, 2019 at 10:43 PM Mostafa Kassem <<a \
href="mailto:mostafak@danlawinc.com" target="_blank">mostafak@danlawinc.com</a>> \
wrote:<u></u><u></u></p> </div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt \
solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"> \
<div> <div>
<p class="MsoNormal"><span style="font-size:10pt">Thank you for your reply, \
Anders.</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt">I created \
an agentx.conf file with this single line:</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">agentxPingInterval \
5</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt">I tried \
putting agentx.conf into one the following directories to no \
avail:</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt">/var/agentx/</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">/var/snmp/</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">Var/net-snmp/</span><u></u><u></u></p> \
<p class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">Where should the agentx.conf file go? \
I did a search on this topic and couldn't find an answer.</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">It is still 15 seconds of \
disconnection.</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt">Thanks again,</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">Mostafa</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><b>From:</b> Anders Wallin <<a href="mailto:wallinux@gmail.com" \
target="_blank">wallinux@gmail.com</a>> <br>
<b>Sent:</b> Thursday, February 21, 2019 2:57 AM<br>
<b>To:</b> Mostafa Kassem <<a href="mailto:mostafak@danlawinc.com" \
target="_blank">mostafak@danlawinc.com</a>><br> <b>Cc:</b> <a \
href="mailto:net-snmp-users@lists.sourceforge.net" target="_blank"> \
net-snmp-users@lists.sourceforge.net</a><br> <b>Subject:</b> Re: AgentX reconnect \
time<u></u><u></u></p> <p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi Mostafa,<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">you need to set it in the config file for your agentx(e.g \
agentx.conf), not in snmpd.conf <u></u><u></u></p> </div>
</div>
<div>
<p class="MsoNormal">Regards<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Anders Wallin<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 21, 2019 at 1:22 AM Mostafa Kassem <<a \
href="mailto:mostafak@danlawinc.com" target="_blank">mostafak@danlawinc.com</a>> \
wrote:<u></u><u></u></p> </div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt \
solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"> <div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">When we restart the snmpd, the \
agent detects that the snmpd is no longer running and disconnects, waits 15 seconds \
and then connects to the snmpd again.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt"> AgentX master disconnected us, \
reconnecting in 15</span><u></u><u></u></p> <p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt">I would like to reduce this time to \
5 seconds. </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10pt">Is this time specifieded in \
agentXPingInterval as described here? <a \
href="http://www.net-snmp.org/docs/man/snmpd.conf.html" \
target="_blank">http://www.net-snmp.org/docs/man/snmpd.conf.html</a> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt">However \
if I add agentXPingInterval 5 to the snmpd.conf file, I get this error: \
</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt">/var/snmp/snmpd.conf: line 35: Warning: Unknown \
token:agentXPingInterval.</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt">I found this code in agentx_config.c which leads me to believe \
that this value is hardcoded and not set in any configuration file. So changing it \
requires editing and recompile of the code.</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">#ifdef \
USING_AGENTX_SUBAGENT_MODULE</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> /*</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> * tokens for master agent</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> */</span><u></u><u></u></p> \
<p class="MsoNormal"><span style="font-size:10pt"> if (SUB_AGENT == agent_role) \
{</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
/*</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
* set up callbacks to initiate master agent pings for this session \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
*/</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
netsnmp_ds_register_config(ASN_INTEGER,</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> \
netsnmp_ds_get_string(NETSNMP_DS_LIBRARY_ID,</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> \
NETSNMP_DS_LIB_APPTYPE),</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> \
"agentxPingInterval",</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> \
NETSNMP_DS_APPLICATION_ID,</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:10pt"> \
NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL);</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> /* ping and/or \
reconnect by default every 15 seconds */</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> \
netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID,</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> \
NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 15);</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt"> \
}</span><u></u><u></u></p> <p class="MsoNormal"><span style="font-size:10pt">#endif \
/* USING_AGENTX_SUBAGENT_MODULE */</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">Thanks,</span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt"> </span><u></u><u></u></p> <p \
class="MsoNormal"><span style="font-size:10pt">Mostafa</span><u></u><u></u></p> \
</div> </div>
<p class="MsoNormal">_______________________________________________<br>
Net-snmp-users mailing list<br>
<a href="mailto:Net-snmp-users@lists.sourceforge.net" \
target="_blank">Net-snmp-users@lists.sourceforge.net</a><br> Please see the following \
page to unsubscribe or change other options:<br> <a \
href="https://lists.sourceforge.net/lists/listinfo/net-snmp-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/net-snmp-users</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote></div>
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic