netstat -B "Recv"

Christian Peron csjp at sqrt.ca
Wed Nov 4 19:34:53 UTC 2015


Your assumptions are correct, recv count is the number of packets which are received by the bpf peer, match count is the number of packets which matched the bpf filter that is active.. this shouldn’t be happening. Are you running netstat during the tcpreplay run or after it completed? Also can you give me more information on what specifically mon0 is?


> On Nov 4, 2015, at 10:44 AM, elof2 at sentor.se wrote:
> 
> 
> Hi!
> 
> Question:
> What do the Recv column in 'netstat -B' show?
> 
> I thought it was tha amount of packets received, but appaently not so.
> 
> I send 2000000 packets from a tcpreplay machine to a receiving machine.
> I do it a few times.
> 
> On the receiver I see:
> netstat -in
> Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
> ix0    1500 <Link#1>      0c:c4:7a:58:e2:3c        0     0     0        0 0     0
> ix1    1500 <Link#2>      0c:c4:7a:58:e2:3d  6000000     0     0        0 0     0
> 
> and then
> netstat -in
> Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
> ix0    1500 <Link#1>      0c:c4:7a:58:e2:3c        0     0     0        0 0     0
> ix1    1500 <Link#2>      0c:c4:7a:58:e2:3d  8000000     0     0        0 0     0
> 
> So 6000000 has increased to 8000000. Good.
> 
> 
> However, 'netstat -B' show:
>  Pid  Netif   Flags      Recv      Drop     Match Sblen Hblen Command
> 25553   mon0 p--s---   1996862         0   2000000     0     0 tcpdump
> 
> How can the "Recv" be *lower* than "Match"?
> 1996862 < 2000000.
> 
> 
> For every new run (fast and slow) I get the same results, slightly less than 2000000 Recv.
> 
> What am I missing?
> 
> /Elof
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"



More information about the freebsd-net mailing list