o***@gomelpromstroy.by
2007-11-18 19:06:07 UTC
-- Installed
ubuntu 7.10
***@ubnt:/home/alex# snmpd -v
NET-SNMP version: 5.3.1
Web: http://www.net-snmp.org/
Email: net-snmp-***@lists.sourceforge.net
-- When requesting
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
-- Get a response
Вск Ноя 18 19:58:40 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76695825
-- Repeat request
***@ubnt:/home/alex# date | snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
IF-MIB::ifInOctets.3 = Counter32: 76695825
-- Again repeat request
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:08 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76701041
-- ... Then the answer is not updated within 30 seconds
-- On proshedstvii 30 seconds
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:37 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76705537
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:38 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76705537
***@ubnt:/home/alex#
/etc/snmp/snmpd.conf
com2sec readwrite 127.0.0.1/32 private
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
view all included .1 80
view system included .iso
access MyRWGroup "" any noauth exact all all none
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <***@localhost>
-- Why are updated only every 30 seconds?
-- In version smnpd 5.1.2, the data are updated through 1 second
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:27 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398074730
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:28 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398075418
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:29 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398076106
office:~#
-- In man snmpd.conf found mention about versionClearCache, thinking that
might help, but ...
man snmpd.conf
...
In either case, the exit statement and output will be cached
for
30s after the initial query. This cache can be flushed by a
SET
request of the integer value 1 to the MIB instance
version‐
ClearCache.0.
...
OID - 1.3.6.1.4.1.2021.100.10.0
ReadWrite
Set to 1 to clear the exec cache, if enabled
***@ubnt:/home/alex# snmpget -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 0
***@ubnt:/home/alex# snmpset -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0 i 1
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 1
***@ubnt:/home/alex# snmpget -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 0
***@ubnt:/home/alex#
ubuntu 7.10
***@ubnt:/home/alex# snmpd -v
NET-SNMP version: 5.3.1
Web: http://www.net-snmp.org/
Email: net-snmp-***@lists.sourceforge.net
-- When requesting
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
-- Get a response
Вск Ноя 18 19:58:40 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76695825
-- Repeat request
***@ubnt:/home/alex# date | snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
IF-MIB::ifInOctets.3 = Counter32: 76695825
-- Again repeat request
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:08 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76701041
-- ... Then the answer is not updated within 30 seconds
-- On proshedstvii 30 seconds
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:37 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76705537
***@ubnt:/home/alex# date; snmpget -v 1 -c private localhost
.1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 19:59:38 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 76705537
***@ubnt:/home/alex#
/etc/snmp/snmpd.conf
com2sec readwrite 127.0.0.1/32 private
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
view all included .1 80
view system included .iso
access MyRWGroup "" any noauth exact all all none
syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <***@localhost>
-- Why are updated only every 30 seconds?
-- In version smnpd 5.1.2, the data are updated through 1 second
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:27 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398074730
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:28 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398075418
office:~# date; snmpget -v 1 -c private 169.254.0.1 .1.3.6.1.2.1.2.2.1.10.3
Вск Ноя 18 20:32:29 EET 2007
IF-MIB::ifInOctets.3 = Counter32: 398076106
office:~#
-- In man snmpd.conf found mention about versionClearCache, thinking that
might help, but ...
man snmpd.conf
...
In either case, the exit statement and output will be cached
for
30s after the initial query. This cache can be flushed by a
SET
request of the integer value 1 to the MIB instance
version‐
ClearCache.0.
...
OID - 1.3.6.1.4.1.2021.100.10.0
ReadWrite
Set to 1 to clear the exec cache, if enabled
***@ubnt:/home/alex# snmpget -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 0
***@ubnt:/home/alex# snmpset -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0 i 1
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 1
***@ubnt:/home/alex# snmpget -v 1 -c private localhost
.1.3.6.1.4.1.2021.100.10.0
UCD-SNMP-MIB::versionClearCache.0 = INTEGER: 0
***@ubnt:/home/alex#