I have a simple perl agent in embedded perl, let's say
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/perl/perl_module.pl
and following config file:

rocommunity public
perl do "/path/to/perl_module.pl";

When I start the snmpd agent, it executes all 'perl do' statements and
my subagent is registered. So far so good.

But now I send HUP signal to my snmpd -> it reloads the config and
re-executes all 'perl do' statements. That's somehow expected, but it
leads to $agent->register() with an OID, which is already registered ->
I see a warning and the registration is not replaced.

So, the right way would be to detect that my perl script is running for
second time and  un-register the old handler first... but how? There is
no $agent->unregister method! How can I replace a handler in perl?

Is there a way, how to resolve this situation? I think I am missing
something obvious.


Thanks in advance

Jan

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to