64-bit SNMP counters for FreeBSD && graphing bandwidth usage

Harti Brandt hartmut.brandt at dlr.de
Tue Feb 14 00:07:44 PST 2006


On Mon, 13 Feb 2006, Anders Nordby wrote:

AN>Hi,
AN>
AN>On Tue, Feb 07, 2006 at 05:11:31PM +0300, Gleb Smirnoff wrote:
AN>>> Is there any way to have 64-bit SNMP counters in FreeBSD? Especially for
AN>>> ifInOctets/ifOutOctets. It seems the built-in bsnmpd only has
AN>>> Counter32, and net-snmpd the same (--enable-mfd-rewrites, which is
AN>>> supposed to help, seems to only work in Linux).
AN>> Extended counters live in a separate subtree and bsnmpd supports them:
AN>> 
AN>>> snmpwalk -v 2c host community ifMIB.ifMIBObjects.ifXTable.ifXEntry
AN>
AN>Running FreeBSD 6.0-RELEASE and using net-snmp 5.2.2 to walk the tree, I
AN>get:
AN>
AN># snmpwalk -v 2c -c XXXYYY localhost
AN>ifMIB.ifMIBObjects.ifXTable.ifXEntry
AN>IF-MIB::ifName.1 = STRING: bge0
AN>IF-MIB::ifName.2 = STRING: bge1
AN>IF-MIB::ifName.3 = STRING: lo0
AN>IF-MIB::ifInMulticastPkts.1 = Counter32: 3430126
AN>IF-MIB::ifInMulticastPkts.2 = Counter32: 0
AN>IF-MIB::ifInMulticastPkts.3 = Counter32: 0
AN>IF-MIB::ifInBroadcastPkts.1 = Counter32: 0
AN>IF-MIB::ifInBroadcastPkts.2 = Counter32: 0
AN>IF-MIB::ifInBroadcastPkts.3 = Counter32: 0
AN>IF-MIB::ifOutMulticastPkts.1 = Counter32: 0
AN>IF-MIB::ifOutMulticastPkts.2 = Counter32: 0
AN>IF-MIB::ifOutMulticastPkts.3 = Counter32: 0
AN>IF-MIB::ifOutBroadcastPkts.1 = Counter32: 0
AN>IF-MIB::ifOutBroadcastPkts.2 = Counter32: 0
AN>IF-MIB::ifOutBroadcastPkts.3 = Counter32: 0
AN>IF-MIB::ifLinkUpDownTrapEnable.1 = INTEGER: enabled(1)
AN>IF-MIB::ifLinkUpDownTrapEnable.2 = INTEGER: enabled(1)
AN>IF-MIB::ifLinkUpDownTrapEnable.3 = INTEGER: disabled(2)
AN>IF-MIB::ifHighSpeed.1 = Gauge32: 10
AN>IF-MIB::ifHighSpeed.2 = Gauge32: 10
AN>IF-MIB::ifHighSpeed.3 = Gauge32: 0
AN>IF-MIB::ifPromiscuousMode.1 = INTEGER: false(2)
AN>IF-MIB::ifPromiscuousMode.2 = INTEGER: false(2)
AN>IF-MIB::ifPromiscuousMode.3 = INTEGER: false(2)
AN>IF-MIB::ifConnectorPresent.1 = INTEGER: true(1)
AN>IF-MIB::ifConnectorPresent.2 = INTEGER: true(1)
AN>IF-MIB::ifConnectorPresent.3 = INTEGER: false(2)
AN>IF-MIB::ifAlias.1 = STRING: 
AN>IF-MIB::ifAlias.2 = STRING: 
AN>IF-MIB::ifAlias.3 = STRING: 
AN>IF-MIB::ifCounterDiscontinuityTime.1 = Timeticks: (0) 0:00:00.00
AN>IF-MIB::ifCounterDiscontinuityTime.2 = Timeticks: (0) 0:00:00.00
AN>IF-MIB::ifCounterDiscontinuityTime.3 = Timeticks: (0) 0:00:00.00
AN>
AN>It seems ifHCInOctets and ifHCOutOctets are missing. How come? Do I need
AN>to use SNMP v3? Another query tool?

10 bits/seconds seems utterly wrong for bge interfaces :-) The HC counters 
appear only for speeds >= 20Mbit/sec according to the RFC.

harti


More information about the freebsd-net mailing list