[mrtg-developers] cfgmaker reports wrong Max Speed with SNMPv2 (2.10.15)
Larry Fahnoe
fahnoe at FahnoeTech.com
Mon Nov 22 22:44:23 MET 2004
Hello,
Recently I started using SNMPv2 queries to talk to some of my routers
by passing --snmp-options=:::::2 to cfgmaker (2.10.15), and while this
works well for many interfaces, on some I'm getting speeds that are
too high. It looks like cfgmaker is being too trusting of the value
it gets from ifHighSpeed.
Currently the two speed tables are walked to determine the interface
speed, and then later on IsCounterBroken() checks ifHCInOctets to
determine if SNMPv2 counters are valid. It looks as though
ifHCInOctets ought to be checked during the selection of either
ifSpeed or ifHighSpeed for the interface speed. This looks like a
substantial change to the logic, so I'm just reporting the bug rather
than hacking together a patch that breaks something else.
In the following example Serial3/0.1 (20) is a T1 which cfgmaker
reports the max speed as 250kBytes/s. If I go back to using SNMPv1
queries, cfgmaker gets it right and reports 193kBytes/s.
A proper fix would be appreciated!
--Larry
$ cfgmaker \
--output=test.cfg \
--global 'WorkDir: /var/www/html/mrtg' \
--global 'WithPeak[_]: wmy' \
--global 'options[_]: growright' \
--global 'forks: 2' \
--ifdesc=descr \
--ifref=ip \
--subdirs=HOSTNAME \
--snmp-options=:::::2 \
x at a.b.c.d
--base: Get Device Info on x at a.b.c.d:::::2
--base: Vendor Id: cisco
--base: Populating confcache
--snpo: confcache x at a.b.c.d:::::2 Name Se4/0 --> 1
--snpo: confcache x at a.b.c.d:::::2 Name Fa0/0 --> 2
--snpo: confcache x at a.b.c.d:::::2 Name Fa1/0 --> 3
--snpo: confcache x at a.b.c.d:::::2 Name Et2/0 --> 4
--snpo: confcache x at a.b.c.d:::::2 Name Et2/1 --> 5
--snpo: confcache x at a.b.c.d:::::2 Name Et2/2 --> 6
--snpo: confcache x at a.b.c.d:::::2 Name Et2/3 --> 7
--snpo: confcache x at a.b.c.d:::::2 Name Et2/4 --> 8
--snpo: confcache x at a.b.c.d:::::2 Name Et2/5 --> 9
--snpo: confcache x at a.b.c.d:::::2 Name Et2/6 --> 10
--snpo: confcache x at a.b.c.d:::::2 Name Et2/7 --> 11
--snpo: confcache x at a.b.c.d:::::2 Name Se3/0 --> 12
--snpo: confcache x at a.b.c.d:::::2 Name Se3/1 --> 13
--snpo: confcache x at a.b.c.d:::::2 Name Se3/2 --> 14
--snpo: confcache x at a.b.c.d:::::2 Name Se3/3 --> 15
--snpo: confcache x at a.b.c.d:::::2 Name Fa5/0 --> 16
--snpo: confcache x at a.b.c.d:::::2 Name Fa5/1 --> 17
--snpo: confcache x at a.b.c.d:::::2 Name Nu0 --> 18
--snpo: confcache x at a.b.c.d:::::2 Name Lo0 --> 19
--snpo: confcache x at a.b.c.d:::::2 Name Se3/0.1 --> 20
--snpo: confcache x at a.b.c.d:::::2 Name Se3/1.1 --> 21
--snpo: confcache x at a.b.c.d:::::2 Name Se3/2.1 --> 22
--snpo: confcache x at a.b.c.d:::::2 Name Se3/3.1 --> 23
[...]
--base: Get Interface Info
--base: Walking ifIndex
--base: Walking ifType
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Walking ifAlias
--base: Walking vmVlan
--base: Walking ifSpeed
--base: Walking ifHighSpeed
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.1 -> 44 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.1 -> 0
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.2 -> 100 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.2 -> 166401502101
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.3 -> 100 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.3 -> 50289942
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.4 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.4 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.5 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.5 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.6 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.6 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.7 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.7 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.8 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.8 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.9 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.9 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.10 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.10 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.11 -> 10 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.11 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.12 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.12 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.13 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.13 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.14 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.14 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.15 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.15 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.16 -> 100 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.16 -> 9102888686
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.17 -> 100 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.17 -> 0
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.18 -> 10000 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.18 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.19 -> 8000 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.19 -> 0
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.20 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.20 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.21 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.21 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.22 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.22 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: snmpget x at a.b.c.d:::::2:v4only for ifHighSpeed.23 -> 2 Mb/s
--base: snmpget x at a.b.c.d:::::2:v4only for ifHCInOctets.23 ->
--base: check for HighspeedCounters failed ... Dropping back to V1
--base: Writing test.cfg
--
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com
952/925-0744 Minneapolis, Minnesota www.FahnoeTech.com
--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers
More information about the mrtg-developers
mailing list