Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2009 22:26:42 +0000
From:      Vincent Hoffman <vince@unsane.co.uk>
To:        Felipe Jara Saba <nex84@vtr.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: differentiated statistics for ipv4/ipv6 traffica?
Message-ID:  <499DDCA2.5050108@unsane.co.uk>
In-Reply-To: <499C4ECC.8050109@vtr.net>
References:  <499C4ECC.8050109@vtr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?499DDCA2.5050108>