Hi Benhard,
    I've a similiar requirement, in which subagent is part of a large
application. Since application can be started/stopped at run-time same is
applicable for subagent also.
    any help on this?

thganks & regards,
                Nitin

-----Original Message-----
From: Penz, Bernhard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 12:22 PM
To: Richard Sun; [EMAIL PROTECTED]
Subject: RE: APIs to restart agentx subagent 


Hallo,

The AgentX subagent tries to automatically re-register its MIB range as soon
as the master agent is up again. It should not be necessary to manually do
all that stuff. Is there a specific reason why you use the IPC heartbeat
messaging?

Regards,
Bernhard 

> -----Original Message-----
> From: Richard Sun [mailto:[EMAIL PROTECTED] 
> Sent: Dienstag, 10. August 2004 21:57
> To: [EMAIL PROTECTED]
> Subject: APIs to restart agentx subagent 
> 
> Hi, all,
> 
> I need to implement the following scenario:
> Assume AgentX master/subagent are running happily. Now:
> 1. Master goes down;
> 2. Subagent successfully detects master went down (using
>     some kind of propritory IPC heartbeat messaging); 3. Now 
> master comes up, and the subagent now
>     is informed that master is up (using
>     again propritory IPC messaging);
> 4. The question is: what to do in subagent to
>     cause re-register of all its MIBs with master?
> 
> I tried snmp_shutdown(), then trying to start SNMP again, but 
> I got the following segmentation fault (at the end of this 
> email). I am using ver 5.0.8.
> 
> I use register_mib_range in sugagent.
> I also tried to unregister_mib_range, then call 
> register_mib_range again. I got segmentation fault again.
> 
> Then I noticed lots of the discussions on "Deregistration of 
> a MIB", but it mainly talks an API to unregister handler. I 
> do not register any handler.
> 
> To solve my problem, the ideal case is an API to cause 
> subagent to re-register all existing MIB with master agent.
> Is there such an API (or a set of APIs)?
> If not, does any of the latest version support 
> register_mib_range AND unregister_mib_range correctly?
> 
> Does agentxPingInterval  help here?
> Thanks for your help.
> -Richard
> 
> 
> (gdb) where
> #0  __pthread_mutex_lock (mutex=0x0) at mutex.c:99
> #1  0x0fcada90 in __libc_free (mem=0x10051e48) at malloc.c:3154
> #2  0x0ffa3634 in netsnmp_handler_registration_free 
> (reginfo=0x10092190)
>      at ../../../net-snmp/agent/agent_handler.c:444
> #3  0x0ff9de50 in netsnmp_subtree_free (a=0x100551b0)
>      at ../../../net-snmp/agent/agent_registry.c:83
> #4  0x0ff9ed4c in netsnmp_register_mib (moduleName=0x10053c60 
> "\017�\231
> \017�\231 next",
>      var=0x0, varsize=4294967295, numvars=0, 
> mibloc=0x7ffffa18, mibloclen=1, priority=0,
>      range_subid=0, range_ubound=0, ss=0xfcada90, 
> context=0x0, timeout=0, flags=0,
>      reginfo=0x10092190, perform_callback=264952464)
>      at ../../../net-snmp/agent/agent_registry.c:619
> #5  0x0ffa306c in netsnmp_register_handler (reginfo=0x10092190)
>      at ../../../net-snmp/agent/agent_handler.c:163
> #6  0x0ff2b208 in netsnmp_register_null (loc=0x7ffffa18, loc_len=1)
>      at ../../../../net-snmp/agent/helpers/null.c:28
> #7  0x0ffa00a4 in setup_tree () at
> ../../../net-snmp/agent/agent_registry.c:1423
> #8  0x0ff9d930 in init_agent (app=0x1 <Address 0x1 out of bounds>)
>      at ../../../net-snmp/agent/snmp_vars.c:231
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on 
> Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic 
> DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free 
> Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> Net-snmp-coders mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
> 
> 


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to