Re: Perhaps in OID .1.3.6.1.2.1.2.2.1.10.3 are updated only every 30 seconds, why?

oleg <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Здравствуйте, Dave Shield
Ответ на Ваше письмо от 18.11.2007 21:36

> But have a look at the NET-SNMP-AGENT-MIB::nsCacheTable.
> That should allow you to tweak the expiry time of the ifTable cache,
> or turn it off completely (by setting it to 0).

Thank you very much for the hint!
Helped follows:

root@ubnt:/home/alex# snmpget -v 1 -c private localhost 
.iso.org.dod.internet.private.enterprises.netSnmp.netSnmpObjects.nsCache.nsCacheTable.nsCacheEntry.nsCacheTimeout.1.3.6.1.2.1.2.2
NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 = INTEGER: 30
root@ubnt:/home/alex# snmpset -v 1 -c private localhost 
.iso.org.dod.internet.private.enterprises.netSnmp.netSnmpObjects.nsCache.nsCacheTable.nsCacheEntry.nsCacheTimeout.1.3.6.1.2.1.2.2 
i 1
NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 = INTEGER: 1
root@ubnt:/home/alex# snmpget -v 1 -c private localhost 
.iso.org.dod.internet.private.enterprises.netSnmp.netSnmpObjects.nsCache.nsCacheTable.nsCacheEntry.nsCacheTimeout.1.3.6.1.2.1.2.2
NET-SNMP-AGENT-MIB::nsCacheTimeout.1.3.6.1.2.1.2.2 = INTEGER: 1
root@ubnt:/home/alex# snmpget -v 1 -c privategps localhost 
.1.3.6.1.2.1.2.2.1.10.3
IF-MIB::ifInOctets.3 = Counter32: 5965581
root@ubnt:/home/alex# snmpget -v 1 -c privategps localhost 
.1.3.6.1.2.1.2.2.1.10.3
IF-MIB::ifInOctets.3 = Counter32: 5965933
root@ubnt:/home/alex# snmpget -v 1 -c privategps localhost 
.1.3.6.1.2.1.2.2.1.10.3
IF-MIB::ifInOctets.3 = Counter32: 5966285

there are still a number of issues

1.
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

how to maintain the state of OID, or re-establish values needed OID?

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

cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
  face |bytes    packets errs drop fifo frame compressed multicast|bytes 
    packets errs drop fifo colls carrier compressed
     lo:  216180     935    0    0    0     0          0         0 
216180     935    0    0    0     0       0          0
   eth1: 4431269    5585    0    0    0     0          0        17 
764898    6332    0    0    0     0       0          0
   eth2:   88454    1002    0    0    0     0          0         0 
90988     761    0    0    0     0       0          0
   eth3:    6036      78    0    0    0     0          0         0 
8264      98    0    0    0     0       0          0
   eth4:   50789     580    0    0    0     0          0         0 
1772      26    0    0    0     0       0          0
   eth0:  934991    8355    0    0    0     0          0         0 
2920080    8049    0    0    0     0       0          0
   sit0:       0       0    0    0    0     0          0         0 
   0       0    0    0    0     0       0          0

snmpwalk -v 1 -c private localhost iftable | grep ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth1
IF-MIB::ifDescr.3 = STRING: eth2
IF-MIB::ifDescr.4 = STRING: eth3
IF-MIB::ifDescr.5 = STRING: eth4
IF-MIB::ifDescr.6 = STRING: eth0
IF-MIB::ifDescr.7 = STRING: sit0
	
order devices - lo eth1 eth2 eth3 eth4 eth0 sit0

after reboot

cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
  face |bytes    packets errs drop fifo frame compressed multicast|bytes 
    packets errs drop fifo colls carrier compressed
     lo:  715758    3290    0    0    0     0          0         0 
715758    3290    0    0    0     0       0          0
   eth2: 3764882   15476    0    0    0     0          0         0 
10887263   17284    0    0    0     0       0          0
   eth3:   56643     349    0    0    0     0          0         0 
78477     347    0    0    0     0       0          0
   eth4:  357422    2982    0    0    0     0          0         0 
215365    2305    0    0    0     0       0          0
   eth1:105923511   86945    0    0    0     0          0        27 
7206085   68837    0    0    0     0       0          0
   eth0:860359620  977560    0    0    0     0          0         0 
122021014  425923    0    0    0     0       0          0
   sit0:       0       0    0    0    0     0          0         0 
   0       0    0    0    0     0       0          0

snmpwalk -v 1 -c private localhost iftable | grep ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth2
IF-MIB::ifDescr.3 = STRING: eth3
IF-MIB::ifDescr.4 = STRING: eth4
IF-MIB::ifDescr.5 = STRING: eth1
IF-MIB::ifDescr.6 = STRING: eth0
IF-MIB::ifDescr.7 = STRING: sit0


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
how can we work around this problem?

-- 
Олег


-------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.