Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2005 11:35:22 GMT
From:      Vyacheslav Nikitin <slavik@cybersec.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/80610: netstat, lost data due lu format
Message-ID:  <200505041135.j44BZM4w076230@www.freebsd.org>
Resent-Message-ID: <200505041140.j44Be52s092405@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         80610
>Category:       bin
>Synopsis:       netstat, lost data due lu format
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 04 11:40:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vyacheslav Nikitin
>Release:        5.1
>Organization:
>Environment:
FreeBSD proxy 5.1-RELEASE-p18 FreeBSD 5.1-RELEASE-p18 #25: Sat Apr  9 04:22:53 YEKST 2005     root@proxy:/usr/src/sys/i386/compile/ROUTER  i386

>Description:
while use netstat -ibI ifname
i have incorrect traffic data, due %lu conversion 

>How-To-Repeat:
before patch
# netstat -ibI em0
Name    Mtu Network       Address              Ipkts Ierrs     Ibytes    Opkts Oerrs     Obytes  Coll
em0    1500 <Link#1>      00:0c:76:15:19:b6 42412847 114644 2139012754 39868679     0 1925198959     0
em0    1500 192.168.0     proxy             27232885     - 1929981074 23402443     - 2492576428     -

after patch
# netstat -ibI em0
Name    Mtu Network       Address              Ipkts Ierrs          Ibytes    Opkts Oerrs          Obytes  Coll
em0    1500 <Link#1>      00:0c:76:15:19:b6 42409691 114643     66561229287 39865831     0     66348905331     0
em0    1500 192.168.0     proxy             27231451     -     66353909632 23401079     -     66916942425     -

>Fix:
--- if.c        Thu Mar  6 00:20:28 2003
+++ if.c.fixed  Wed May  4 16:37:56 2005
@@ -381,7 +381,7 @@
                show_stat("lu", 5, ierrors, link_layer);
                printf(" ");
                if (bflag) {
-                       show_stat("lu", 10, ibytes, link_layer|network_layer);
+                       show_stat("llu", 15, ibytes, link_layer|network_layer);
                        printf(" ");
                }
                show_stat("lu", 8, opackets, link_layer|network_layer);
@@ -389,7 +389,7 @@
                show_stat("lu", 5, oerrors, link_layer);
                printf(" ");
                if (bflag) {
-                       show_stat("lu", 10, obytes, link_layer|network_layer);
+                       show_stat("llu", 15, obytes, link_layer|network_layer);
                        printf(" ");
                }
                show_stat("lu", 5, collisions, link_layer);

>Release-Note:
>Audit-Trail:
>Unformatted:



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