On 20/11/2007, oleg wrote:
> if you enter a new value OID
> NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 = INTEGER: 1
> further
> /etc/init.d/snmpd restart
> OID returns to
> NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 = INTEGER: 30


That's correct.
The initial cache timeout is hardcoded into the MIB implementation.

> how to maintain the state of OID....


Not possible. Sorry.

> ..... or re-establish values needed OID?


edit "/etc/init.d/snmpd" and add the line:

snmpset -v 1 -c private localhost
NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 i 1

to the end of the "start" function :-)



> if I am not mistaken OID values for RFC1213-MIB: ifTable derived from
> /proc/net/dev


It depends on the O/S, but yes - I believe that is the source of
the ifTable statistics on Linux kit.


> order devices - lo eth1 eth2 eth3 eth4 eth0 sit0
> after reboot
> order devices - lo eth2 eth3 eth4 eth1 eth0 sit0
>
> for this reason, changing the name of a particular network device OID
> and value for a particular device had to borrow from another OID


That's certainly possible.
>From the IF-MIB;


".....The value [of ifIndex] for each interface sub-layer
must remain constant at least from one re-initialization of
the entity's network management system to the next re-
initialization."

The I/F indexes cannot change while the agent is running,
but they *can* change if you restart the agent.

> how can we work around this problem?


You cannot rely on the index values being constant.
Your management application needs to watch for the agent
restarting (e.g. by monitoring sysUpTime.0), and be ready
to walk the "ifName" (or "ifAlias") column to establish the
correct mapping.

I don't believe that the agent can be configured to retain a given
ifIndex mapping. (Although this has been suggested in the past).

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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/...net-snmp-users