From owner-freebsd-net@FreeBSD.ORG Thu Feb 19 22:26:45 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD661106568B for ; Thu, 19 Feb 2009 22:26:45 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3A36D8FC1C for ; Thu, 19 Feb 2009 22:26:45 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vhoffman-macbook.local ([IPv6:2001:470:9099:0:214:51ff:feed:712d]) (authenticated bits=0) by unsane.co.uk (8.14.3/8.14.0) with ESMTP id n1JMRYKp024595 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 19 Feb 2009 22:27:35 GMT (envelope-from vince@unsane.co.uk) Message-ID: <499DDCA2.5050108@unsane.co.uk> Date: Thu, 19 Feb 2009 22:26:42 +0000 From: Vincent Hoffman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1b3pre) Gecko/20081204 Thunderbird/3.0b1 MIME-Version: 1.0 To: Felipe Jara Saba References: <499C4ECC.8050109@vtr.net> In-Reply-To: <499C4ECC.8050109@vtr.net> X-Enigmail-Version: 0.96a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: differentiated statistics for ipv4/ipv6 traffica? 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: Thu, 19 Feb 2009 22:26:46 -0000 On 18/2/09 18:09, Felipe Jara Saba wrote: > Hello: > > Has anyone tried to get differentiated statistics for ipv4/ipv6 > traffic in a FreeBSD server?. I was hoping that I could retrieve that > information through SNMP (I`m running net-snmp on a freebsd 7.1 box), > but even though there is a IPv6-MIB.txt in the > /usr/local/share/snmp/mibs dir, it seems it only shows the ipv4/ipv6 > traffic combined into the same counters. > > Greetings > > Best I can think of is netstat. Should be enough info using the -i or -I arguments with -b (-h optional.) (22:20:27 <~>) 0 # netstat -i -bh -f inet6 Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll bge0 1500 fe80:1::2e0:8 fe80:1::2e0:81ff: 5.0K - 335K 5.0K - 340K - bge0 1500 2001:470:1f09 2001:470:1f09:110 1.6M - 291M 2.4M - 3.0G - em1 1500 fe80:3::207:e fe80:3::207:e9ff: 0 - 0 4 - 288 - lo0 16384 localhost ::1 637 - 74K 642 - 75K - lo0 16384 fe80:7::1 fe80:7::1 0 - 0 0 - 0 - root@crab (22:18:17 <~>) 0 # netstat -I bge0 -bh -f inet6 Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll bge0 1500 fe80:1::2e0:8 fe80:1::2e0:81ff: 4.9K - 334K 5.0K - 339K - bge0 1500 2001:470:1f09 2001:470:1f09:110 1.6M - 291M 2.4M - 3.0G - Hope that helps, Vince