On Mon, 2005-08-01 at 22:27 +0800, [EMAIL PROTECTED] wrote:
> i have a question, why snmpd.conf could not contain this line:
> sysContact i am nami ?
The problem lies in what should happen if you send a SET request
to change this contact information, and then restart the agent:
snmpset .... sysContact.0 s "I am not nami"
/etc/rc.d/init.d/snmpd restart
snmpget .... sysContact.0
The natural expectation is that this should return "I am not nami"
But if the snmpd.conf file contains the line
"sysContact i am nami"
then the agent will use this to set the contact information when
the agent starts up again, so it will return "i am nami"
The agent is allowed to write to the persistent snmpd.conf file,
but we didn't want the agent fiddling about with all the other
ones (which could easily be maintained from a central 'rdist'
store, or similar). So the easiest approach was to block any
attempt to update this value (via SET requests) if there was a
contact string set in the config file.
If the snmpd.conf file does *not* contain this line, then the
agent can safely update the contact information, and save this
in the persistent snmpd.conf file to remember it across agent
reboots.
It's a little bit confusing at first sight, but it does sort
of make sense.
Dave
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders