Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2004 15:57:14 +0200
From:      Iasen Kostov <tbyte@OTEL.net>
To:        Iasen Kostov <tbyte@OTEL.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: netstat patch for bridge stats
Message-ID:  <41A7363A.2000201@OTEL.net>
In-Reply-To: <41A61434.3000700@OTEL.net>
References:  <41A61434.3000700@OTEL.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Iasen Kostov wrote:

>    Hi,
> this is a small patch which will make bridge stats
> look nicer (or at least look some way :) ), because
> this is current situation:
>
> -- Bridging statistics (bdg) --
> Name          In      Out  Forward     Drop    Bcast    Mcast    
> Local  Unknown
> vlan5:1 709303965749269168687899969   123884 13908828  3236774    
> 10765  4123745
> vlan904:1 759386539711221922749370414   447736  6319135   177242    
> 49244  3022768
>
> It is really a mess :) and does not looks like other protocol stats do.
> And this is how it looks after the patch:
>
> -- Bridging statistics (bdg) --
> vlan5:1:
>        721198379 total packets recieved
>        762906756 total packets sent
>        699495544 forwarded
>        124082 dropped
>        14073971 broadcasts
>        3251664 multicasts
>        10784 for local interface
>        4242334 unknown packets
> vlan904:1:
>        773320391 total packets recieved
>        723117599 total packets sent
>        763146879 forwarded
>        447736 dropped
>        6424601 broadcasts
>        179482 multicasts
>        49248 for local interface
>        3072445 unknown packets
>
> I'll be happy to see comments about this.
>
>    regards.
>
>------------------------------------------------------------------------
>
>--- usr.bin/netstat/if.org.c	Thu Nov 25 18:13:34 2004
>+++ usr.bin/netstat/if.c	Thu Nov 25 18:59:29 2004
>@@ -101,11 +101,12 @@
> 	bdg_done = 1;
> #endif
>     printf("-- Bridging statistics (%s) --\n", name) ;
>-    printf(
>-"Name          In      Out  Forward     Drop    Bcast    Mcast    Local  Unknown\n");
>     for (i = 0 ; i < 16 ; i++) {
> 	if (s.s[i].name[0])
>-	printf("%-6s %9ld%9ld%9ld%9ld%9ld%9ld%9ld%9ld\n",
>+	printf("%-6s:\n\t%ld total packets recieved\n\t%ld total packets sent\n\t" \
>+	       "%ld forwarded\n\t%ld dropped\n\t" \
>+	       "%ld broadcasts\n\t%ld multicasts\n\t%ld for local interface\n\t" \
>+	       "%ld unknown packets\n",
> 	  s.s[i].name,
> 	  s.s[i].p_in[(int)BDG_IN],
> 	  s.s[i].p_in[(int)BDG_OUT],
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>freebsd-net@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-net
>To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>  
>
OK I sorry to replying my self but this:

vlan5:1:
        1002610279 total packets received
        1070806491 total packets sent

could not be formated by "%9ld" :)
and thus  current output of "netstat -pbdg" it tottaly mean less.
And the worst thing is that this are stats for 3 days ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41A7363A.2000201>