From owner-freebsd-net@FreeBSD.ORG  Mon Feb 13 19:14:11 2006
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
X-Original-To: freebsd-net@FreeBSD.org
Delivered-To: freebsd-net@FreeBSD.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 925EC16A420;
	Mon, 13 Feb 2006 19:14:11 +0000 (GMT)
	(envelope-from glebius@FreeBSD.org)
Received: from cell.sick.ru (cell.sick.ru [217.72.144.68])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C944F43D5C;
	Mon, 13 Feb 2006 19:14:09 +0000 (GMT)
	(envelope-from glebius@FreeBSD.org)
Received: from cell.sick.ru (glebius@localhost [127.0.0.1])
	by cell.sick.ru (8.13.3/8.13.3) with ESMTP id k1DJE6ch055774
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Mon, 13 Feb 2006 22:14:07 +0300 (MSK)
	(envelope-from glebius@FreeBSD.org)
Received: (from glebius@localhost)
	by cell.sick.ru (8.13.3/8.13.1/Submit) id k1DJE697055773;
	Mon, 13 Feb 2006 22:14:06 +0300 (MSK)
	(envelope-from glebius@FreeBSD.org)
X-Authentication-Warning: cell.sick.ru: glebius set sender to
	glebius@FreeBSD.org using -f
Date: Mon, 13 Feb 2006 22:14:06 +0300
From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Anders Nordby <anders@FreeBSD.org>
Message-ID: <20060213191406.GB86448@cell.sick.ru>
Mail-Followup-To: Gleb Smirnoff <glebius@FreeBSD.org>,
	Anders Nordby <anders@FreeBSD.org>, freebsd-net@FreeBSD.org,
	demon@FreeBSD.org, harti@FreeBSD.org, kuriyama@FreeBSD.org
References: <20060206092443.GA61116@totem.fix.no>
	<20060207141131.GU877@FreeBSD.org>
	<20060213173008.GA14643@totem.fix.no>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <20060213173008.GA14643@totem.fix.no>
User-Agent: Mutt/1.5.6i
Cc: freebsd-net@FreeBSD.org, harti@FreeBSD.org, kuriyama@FreeBSD.org,
	demon@FreeBSD.org
Subject: Re: 64-bit SNMP counters for FreeBSD && graphing bandwidth usage
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Feb 2006 19:14:12 -0000

On Mon, Feb 13, 2006 at 06:30:08PM +0100, Anders Nordby wrote:
A> On Tue, Feb 07, 2006 at 05:11:31PM +0300, Gleb Smirnoff wrote:
A> >> Is there any way to have 64-bit SNMP counters in FreeBSD? Especially for
A> >> ifInOctets/ifOutOctets. It seems the built-in bsnmpd only has
A> >> Counter32, and net-snmpd the same (--enable-mfd-rewrites, which is
A> >> supposed to help, seems to only work in Linux).
A> > Extended counters live in a separate subtree and bsnmpd supports them:
A> > 
A> >> snmpwalk -v 2c host community ifMIB.ifMIBObjects.ifXTable.ifXEntry

Actually, I've misinformed you. On 32-bit platforms HC counters exist,
but overflow as bad as old 32 bit counters. The fix has been committed
by Harti today to HEAD (BEGEMOT vendor branch).

A> Running FreeBSD 6.0-RELEASE and using net-snmp 5.2.2 to walk the tree, I
A> get:

bsnmpd doesn't create HC MIB branch for interfaces with slow speed.
Are your interfaces negotiated to 10 Mbit/s?

A> # snmpwalk -v 2c -c XXXYYY localhost
A> ifMIB.ifMIBObjects.ifXTable.ifXEntry
A> IF-MIB::ifName.1 = STRING: bge0
A> IF-MIB::ifName.2 = STRING: bge1
A> IF-MIB::ifName.3 = STRING: lo0
A> IF-MIB::ifInMulticastPkts.1 = Counter32: 3430126
A> IF-MIB::ifInMulticastPkts.2 = Counter32: 0
A> IF-MIB::ifInMulticastPkts.3 = Counter32: 0
A> IF-MIB::ifInBroadcastPkts.1 = Counter32: 0
A> IF-MIB::ifInBroadcastPkts.2 = Counter32: 0
A> IF-MIB::ifInBroadcastPkts.3 = Counter32: 0
A> IF-MIB::ifOutMulticastPkts.1 = Counter32: 0
A> IF-MIB::ifOutMulticastPkts.2 = Counter32: 0
A> IF-MIB::ifOutMulticastPkts.3 = Counter32: 0
A> IF-MIB::ifOutBroadcastPkts.1 = Counter32: 0
A> IF-MIB::ifOutBroadcastPkts.2 = Counter32: 0
A> IF-MIB::ifOutBroadcastPkts.3 = Counter32: 0
A> IF-MIB::ifLinkUpDownTrapEnable.1 = INTEGER: enabled(1)
A> IF-MIB::ifLinkUpDownTrapEnable.2 = INTEGER: enabled(1)
A> IF-MIB::ifLinkUpDownTrapEnable.3 = INTEGER: disabled(2)
A> IF-MIB::ifHighSpeed.1 = Gauge32: 10
A> IF-MIB::ifHighSpeed.2 = Gauge32: 10
A> IF-MIB::ifHighSpeed.3 = Gauge32: 0
A> IF-MIB::ifPromiscuousMode.1 = INTEGER: false(2)
A> IF-MIB::ifPromiscuousMode.2 = INTEGER: false(2)
A> IF-MIB::ifPromiscuousMode.3 = INTEGER: false(2)
A> IF-MIB::ifConnectorPresent.1 = INTEGER: true(1)
A> IF-MIB::ifConnectorPresent.2 = INTEGER: true(1)
A> IF-MIB::ifConnectorPresent.3 = INTEGER: false(2)
A> IF-MIB::ifAlias.1 = STRING: 
A> IF-MIB::ifAlias.2 = STRING: 
A> IF-MIB::ifAlias.3 = STRING: 
A> IF-MIB::ifCounterDiscontinuityTime.1 = Timeticks: (0) 0:00:00.00
A> IF-MIB::ifCounterDiscontinuityTime.2 = Timeticks: (0) 0:00:00.00
A> IF-MIB::ifCounterDiscontinuityTime.3 = Timeticks: (0) 0:00:00.00
A> 
A> It seems ifHCInOctets and ifHCOutOctets are missing. How come? Do I need
A> to use SNMP v3? Another query tool?

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE