This is a discussion on Re: Reloading config with -HUP and update_config does not work - SNMP ; On tor, 2007-11-15 at 08:23 +0000, Colin Wernham wrote: > I have a problem with re-loading the snmpd.conf config using > update_config() function as it appears to not do any reloading of > config. It does reload the config. If ...
On tor, 2007-11-15 at 08:23 +0000, Colin Wernham wrote:
> I have a problem with re-loading the snmpd.conf config using
> update_config() function as it appears to not do any reloading of
It does reload the config. If you were to try again with the flag
-Dsnmpd_ports you would see it change the port specification.
> If I change the agentaddress config to a different port and then call
> update_config(), the old port remains open and the new one is not
> opened (as viewed by netstat -uan).
This is also, sadly, true.
The problem is that sockets are opened from the function
init_master_agent and that is only called once from main.
Another question is what to do on reconfiguration of the port spec.
There are a few basic cases.
A port is added => open the port.
What should happen if opening the port fails?
A port is removed => close the port.
How should clients be notified? Should clients be notified?
A port is retained
The port MUST NOT get closed since it we do support connection
Then there are some hard ones.
The interface set of a port is expanded or shrunk (e.g. change from
*:161 to localhost:161)
Here connections on the interfaces that are left after the session
creation MUST NOT get closed.
How would you handle the above cases?
> I have the netsnmp sub-agent built into my code and I cannot just
> terminate the process and re-start it, so I need a method of
> re-configuring the agent on the fly.
> I have also tried:
> And then starting up the agent again, but the shutdown crashes when
> freeing up it's resources.
Alas, yes. That is quite bad.
> My net-snmp version is: 5.3.1
> Does anyone know why this function (and effectively -HUP to the snmpd)
> no longer works? Did it ever work?
It works in general, you have just choosen an unfortunate config item to
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
Net-snmp-coders mailing list