From owner-freebsd-net@FreeBSD.ORG Wed Feb 15 06:19:45 2006 Return-Path: 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 319C116A422 for ; Wed, 15 Feb 2006 06:19:45 +0000 (GMT) (envelope-from opolyakov@yahoo.com) Received: from web35302.mail.mud.yahoo.com (web35302.mail.mud.yahoo.com [66.163.179.96]) by mx1.FreeBSD.org (Postfix) with SMTP id 1F6A643D48 for ; Wed, 15 Feb 2006 06:19:43 +0000 (GMT) (envelope-from opolyakov@yahoo.com) Received: (qmail 50786 invoked by uid 60001); 15 Feb 2006 06:19:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HJ+oJPQfFoVLsLHYdWSb4bSjSgmYiDsgrrz7VyC96AePk/kTEvS1/UvNXbpCTQKChW9RDptjlR6m8T5nhXepAkiE0+isOLWXF3cWyc3SfbQhukqCh/73ap5o/PSLtVHZl745BVZeQ1fqqDJhum/gTlboNGX/WHgddu6MlDYcy6c= ; Message-ID: <20060215061942.50784.qmail@web35302.mail.mud.yahoo.com> Received: from [69.228.89.153] by web35302.mail.mud.yahoo.com via HTTP; Tue, 14 Feb 2006 22:19:42 PST Date: Tue, 14 Feb 2006 22:19:42 -0800 (PST) From: Oleg Polyakov To: Gleb Smirnoff In-Reply-To: <20060214110217.GD68308@cell.sick.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-net@FreeBSD.org, Anders Nordby , Harti Brandt , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2006 06:19:45 -0000 --- Gleb Smirnoff wrote: > Oleg, Anders, > > can you please remove all your changes to if_bge.c and test the > attached patch. Awaiting for feedback and thanks. It works fine - bge0 connected to GIGE switch, bge1 is not connected # snmpget -c pub -v 1 localhost ifSpeed.1 IF-MIB::ifSpeed.1 = Gauge32: 1000000000 # snmpget -c pub -v 1 localhost ifHighSpeed.1 IF-MIB::ifHighSpeed.1 = Gauge32: 1000 # ifconfig bge1 up # ifconfig bge1 media auto # snmpget -c pub -v 1 localhost ifSpeed.2 IF-MIB::ifSpeed.2 = Gauge32: 0 # snmpget -c pub -v 1 localhost ifHighSpeed.2 IF-MIB::ifHighSpeed.2 = Gauge32: 0 # ifconfig bge1 media 10baseT/UTP # snmpget -c pub -v 1 localhost ifSpeed.2 IF-MIB::ifSpeed.2 = Gauge32: 10000000 # snmpget -c pub -v 1 localhost ifHighSpeed.2 IF-MIB::ifHighSpeed.2 = Gauge32: 10 # ifconfig bge1 media 100baseTX # snmpget -c pub -v 1 localhost ifSpeed.2 IF-MIB::ifSpeed.2 = Gauge32: 100000000 # snmpget -c pub -v 1 localhost ifHighSpeed.2 IF-MIB::ifHighSpeed.2 = Gauge32: 100 It might be not important, but if adapter is in DOWN state snmp may show different media: 1. Adapter is Down. ifconfig shows - media: Ethernet autoselect (none) Snmp shows ifSpeed 0. 2. # ifconfig bge1 media 100baseTX. ifconfig shows - media: Ethernet 100baseTX (none) Snmp still shows ifSpeed 0. 3. # ifconfig bge1 up ifconfig shows - media: Ethernet 100baseTX (none) snmp shows ifSpeed 100000000 4. # ifconfig bge1 down snmp still shows ifSpeed 100000000 after running "ifconfig bge1" snmp shows ifSpeed 0 So sometimes ifconfig helps to change baudrate if adapter in DOWN state. Thanks, Oleg > -- > Totus tuus, Glebius. > GLEBIUS-RIPN GLEB-RIPE __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com